Re: How to do "continue" in VB?
From: Jim Carlock (anonymous_at_localhost.com)
Date: 02/06/05
- Next message: lonnyw: "Re: How to do "continue" in VB?"
- Previous message: lonnyw: "Re: How to do "continue" in VB?"
- In reply to: lonnyw: "How to do "continue" in VB?"
- Next in thread: lonnyw: "Re: How to do "continue" in VB?"
- Reply: lonnyw: "Re: How to do "continue" in VB?"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 6 Feb 2005 16:10:45 -0500
The continue statement in C is used to exit a for, while or do
loop in C.
To do the same thing in VB...
For i = 1 to 1000
'do main stuff inside of loop
'check window status...
'...
If (hWnd = 0) Then Exit For
If key = vbKeyEscape Then Exit For
DoEvents
Next i
It seems as if most folks indicate to use "continue" sparingly...
in the C programming language, and to only use it in top level
loops.
Wonder what's up with Apple?
http://www.opensource.apple.com/darwinsource/WWDC2004/bsdmake-11/for.c
HTH.
-- Jim Carlock Post replies to newsgroup. "lonnyw" <<> wrote in message news:eHNxNsIDFHA.1260@TK2MSFTNGP12.phx.gbl... I am changing a program from C to VB. It is quite easy, but I have not found a good way to do a "continue" from C's for loop e.g if( hWnd==0 ) continue; tia.
- Next message: lonnyw: "Re: How to do "continue" in VB?"
- Previous message: lonnyw: "Re: How to do "continue" in VB?"
- In reply to: lonnyw: "How to do "continue" in VB?"
- Next in thread: lonnyw: "Re: How to do "continue" in VB?"
- Reply: lonnyw: "Re: How to do "continue" in VB?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|