View Single Post
Old 06-19-2002, 08:27 PM   PM User | #6
TrueLies
New Coder

 
Join Date: Jun 2002
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
TrueLies is an unknown quantity at this point
Hi

yes labels are fine, and not unsual.
Maybe we can add to the thread that normally we label the outmost loop in case we have a set of *nested* loops: if one of the nested loops meets a condition which is conclusive, you may want to stop not just this latest loop but also (maybe arguably all) the loops up in the cahin that were nesting it.
By labeling a loop higher in the ladder by sintax name+column+loop

aLabelName:
for(...
for(...
for(...

you can instruct form the second or third loop to conclude ALL the loops. This just avoid that, by breaking (break+optionalLableName) a nested loop after mert the eventual condition, the outer loops might go on for a few seconds looping objects that would not actually need be looped any longer. That was the deal!

ciao
__________________
Alberto http://www.unitedscripters.com/
TrueLies is offline   Reply With Quote