|
Post by tsh73 on Oct 5, 2022 15:20:42 GMT -5
I *thought* I know like exit for / exit while works in LB4. I was wrong. Both codes below (exit for from inside of nested while, exit while from inside of nested for) does not compile in LB4! (saying "EXIT FOR without FOR" / "EXIT WHILE without WHILE") But they work just like I imagine - in LB 5.353. (good thing, IMHO)
exit for from inside of nested while
for i = 1 to 2 print i while x<3 x=x+1 print "",x if (x=2) and (i=1) then print "!!" exit for 'this one does not compile in LB4 end if wend next
exit while from inside of nested for
while x<3 x=x+1 print x for i = 1 to 2 print "", i if (x=2) and (i=1) then print "!!" exit while 'this one does not compile in LB4 end if next wend
|
|