very simple question

  • Thread starter Thread starter Roberto Carcione
  • Start date Start date
R

Roberto Carcione

Hi at all,
i need to know if there is a statement in vb like "continue" in c++; to use
in statements loop. I'm using vb net but i think the question is the same
for vb 6 language.
thanks in advance.
roberto
 
Nope. Visual Basic .NET 2005 has it, however.

Hi at all,
i need to know if there is a statement in vb like "continue" in c++; to use
in statements loop. I'm using vb net but i think the question is the same
for vb 6 language.
thanks in advance.
roberto
 
Roberto Carcione said:
i need to know if there is a statement in vb like "continue" in c++; to
use
in statements loop. I'm using vb net but i think the question is the same
for vb 6 language.

In addition to the other reply: You can "fake" 'Continue' using 'GoTo' and
a code label:

\\\
Do
Start:
...
If...Then
GoTo Start
End If
...
Loop While...
///
 
In addition to the other reply: You can "fake" 'Continue' using 'GoTo' and
a code label:

\\\
Do
Start:
...
If...Then
GoTo Start
End If
...
Loop While...
///

I think you want the loop condition to be tested after the
"continue".. the way it is done in C++ etc..

So you want it more like this:

Do
..
..
If xyz Then
'Continue Loop
Goto CONTINUE:
End If
..
..

CONTINUE:
Loop While (Condition)


// CHRIS
 
CHRIS said:
I think you want the loop condition to be tested after the
"continue".. the way it is done in C++ etc..

So you want it more like this:

Do
..
..
If xyz Then
'Continue Loop
Goto CONTINUE:
End If
..
..

CONTINUE:
Loop While (Condition)

ACK, that's more appropriate.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top