Results 1 to 8 of 8

Thread: Infinite Loop

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2006
    Posts
    31

    Infinite Loop

    Whats vb's verison of infinite loop? a timer set to 1?

  2. #2
    Shared Member
    Join Date
    May 2005
    Location
    Kashmir, India
    Posts
    2,277

    Re: Infinite Loop

    VB Code:
    1. Do While True
    2. 'statements
    3. Loop
    Another one
    VB Code:
    1. While True
    2. 'statements
    3. Wend
    Use [code] source code here[/code] tags when you post source code.

    My Articles

  3. #3
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,969

    Re: Infinite Loop

    Heh heh!

    Private Sub Form_Load()
    Call Form_Load
    End Sub

  4. #4
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926

    Re: Infinite Loop

    TysonLPrice, this is not an infinite loop. It is a recursive procedure call. It will generate an out of stack space error.
    Frans

  5. #5
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,969

    Re: Infinite Loop

    Quote Originally Posted by Frans C
    TysonLPrice, this is not an infinite loop. It is a recursive procedure call. It will generate an out of stack space error.
    I was just playing around but I see your point.

  6. #6
    Fanatic Member dark_shadow's Avatar
    Join Date
    Feb 2005
    Location
    Igloo
    Posts
    900

    Re: Infinite Loop

    VB Code:
    1. dim x
    2. x=1
    3. do
    4. beep
    5. loop until x=2
    NOTE : unless you want your app to crash dont use this

  7. #7
    Frenzied Member
    Join Date
    Oct 2003
    Posts
    1,301

    Re: Infinite Loop

    An infinite loop is just any loop that never satisfies it's condition for when to end.

    If we're going to indulge in bad programming practices:

    Label:
    '
    Goto Label

  8. #8
    Frenzied Member cssriraman's Avatar
    Join Date
    Jun 2005
    Posts
    1,465

    Re: Infinite Loop

    Quote Originally Posted by Cipherman
    Whats vb's verison of infinite loop? a timer set to 1?
    why do you want to use infinite loop?

    What you would like to do?
    CS

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width