Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Breaking a double for

Status
Not open for further replies.

bluedragon2

IS-IT--Management
Jan 24, 2003
2,642
US
Easy question I hope,

How do you stop the second FOR and go to the NEXT on the first FOR?

For ex:

FOR A = 1 to 10
FOR B = 1 to 5

IF condition THEN
NEXT A
END IF

NEXT B

NEXT A



[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
never mind,

mind is right and remembered EXIT FOR

[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 

Hi,
Code:
FOR A = 1 to 10
FOR B = 1 to 5

  IF not condition THEN exit for

END IF

NEXT B

NEXT A

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top