INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login




Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

g2000 (Programmer) (OP)
13 Sep 05 15:02
How to skip any loop?
For instance,

ans = 0
For i=Lbound(a) to UBound(a)
  if a(i) = "1" Then
     ???
  else
     answer = answer + cint(a(i))
Next

Or simply speaking, what is the vbscript equivalent of java-continue?  thanks
tsdragon (Programmer)
13 Sep 05 16:03
You just did it. There isn't any equivalent, so you have to do it with conditionals, like you just showed. Instead of ??? you can use a comment, or you can invert the logic and leave off the else part.

Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.

scorpio66 (Programmer)
14 Sep 05 6:10
Exit For
tsdragon (Programmer)
14 Sep 05 8:29
Exit For won't continue the loop, it will end it. That's not what the OP is looking for. They want a command that will skip the rest of the stuff inside the for loop and go back to the top of the loop. There is no syntactical reason to have such a command, you can easily do without it just as the OP demonstrated above. It's just for convenience. I'm surprised Java even has such a command, since it is otherwise such a strict language, and that kind of command violates a major precept of structured programming - one entry, one exit.

Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close