1. scope of labels
- Posted by ChrisB (moderator) Jul 03, 2009
- 878 views
Is this ok?
for j = 1 to 20 label "j" do if x is true then continue "j" end if --other stuff end for --same block, but later for j = 1 to 20 label "j" do if x is true then continue "j" end if --other stuff end for
Chris
2. Re: scope of labels
- Posted by DerekParnell (admin) Jul 03, 2009
- 844 views
ChrisB said...
Is this ok?
for j = 1 to 20 label "j" do if x is true then continue "j" end if --other stuff end for --same block, but later for j = 1 to 20 label "j" do if x is true then continue "j" end if --other stuff end for
Chris
Yes it is ok.
The scope of the label is the for-block, just like the scope of the 'j' variable.