jvs:cigal:manual:chapter2:break
CIGAL Reference Manual, Chapter 2 (Commands): BREAK
BREAK -- Break out of a loop of conditional code
usage: break [N]
The BREAK command is used to exit from a block of conditional code within a WHILE or REPEAT loop in a CIGAL macro program. BREAK has no effect if called anywhere except within a loop. BREAK causes a jump to the end of the loop (indicated by a '}' command) and then continues, without going back up to test the WHILE condition again. The argument, N, indicates how many loops to jump out of (default: N=1). If N is givenm, it must be a constant, not a variable, because its value is read at compile time (rather than run time as for most arguments).
For example:
while(a-- > 10) { b = a*c+d if(b > 100) break ; skip next 8 lines type 'B=' b while(c++ < 20) { if(d > 0) break 2 ; skip next 5 lines if(b > 10) break ; skip next 2 lines type a b c d } type 'D=' d++ }
jvs/cigal/manual/chapter2/break.txt · Last modified: 2024/06/21 15:44 by 127.0.0.1