Results 1 to 4 of 4

Thread: Using the Exit statement, is this OK? (Resolved)

Threaded View

  1. #1

    Thread Starter
    PowerPoster SuperSparks's Avatar
    Join Date
    May 2003
    Location
    London, England
    Posts
    265

    Using the Exit statement, is this OK? (Resolved)

    I've had to put a For Next loop inside a Do While loop:

    VB Code:
    1. Do While i < 24
    2.             ' some code
    3.  
    4.             For j As Byte = 0 To 10
    5.  
    6.                 ' some more code
    7.                 If Rand(j) >= 33 AndAlso Rand(j) <= 126 Then
    8.                     If i = 24 Then Exit Do
    9.                   End If
    10.             Next
    11.  
    12.         Loop

    Is it OK to exit the Do While loop from within the For Next loop like that, or is it going to leave stuff on the stack? As usual MSDN Library is as clear as mud on the matter
    Last edited by SuperSparks; Jun 6th, 2004 at 12:49 PM.
    Nick.

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