is there a "continue" instruction in vb6?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: is there a "continue" instruction in vb6?

  1. #1
    Join Date
    Jul 2007
    Posts
    1

    Thumbs up is there a "continue" instruction in vb6?

    hi

    in the loop for/next, is there a contine instruction?

    like other languages

    good byte

  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    No, VB has no Continue statement. You must either use a GoTo, e.g.:
    Code:
        For I = 1 To N
            If SomeCondition Then GoTo NextIteration
            
    NextIteration:
        Next I
    or enclose the body of the loop in an If...Then block, e.g.:
    Code:
    For I = 1 To N
        If Not SomeCondition Then
           ' Do work here
        End If
    Next I
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

Similar Threads

  1. multi-programs in VB6
    By Sehnsucht in forum VB Classic
    Replies: 6
    Last Post: 10-12-2006, 05:41 PM
  2. Speaking of strings...
    By Harlow in forum .NET
    Replies: 246
    Last Post: 10-26-2002, 01:30 AM
  3. Replies: 3
    Last Post: 07-21-2001, 03:32 PM
  4. Replies: 24
    Last Post: 02-09-2001, 01:18 PM
  5. Com Interop and VB6 Collections
    By Esmond Hart in forum .NET
    Replies: 2
    Last Post: 01-29-2001, 07:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center