CUE Design Director Script Language User Manual
Page 16
Reference Manual Design Director Script Language
www.cuesystem.com
Page 16 of 94
Cycle Do [While | Until] .. Loop [While | Until] (ExitDo)
This cycle handles of all type of cycles with one condition at the beginning / at the end, at the both places
or nowhere. When generated, the design environment checks the correctness of the block Do..Loop, it
assigns to every Do commands only one Loop command. And in addition the block structure of the other
block of commands is not broken i.e. the branching of other cycles.
Between the Do and Loop command can be an unlimited number of commands. The cycle can be left
anywhere using the ExitDo command except the condition at the beginning and at the end. The
parameter of ExitDo command is the level number of Do..Loop commands that are left. If the expression
is evaluated as zero then it will be continued by the following command to ExitDo, otherwise it is
continued by decent “emerge’ of Loop command. If there are not enough Do..Loop loops in a macro
then it is continued with the highest possible level of emerge in the given macro – the macro is neither
left nor the loops are skipped in those the calculation has not started yet (other blocks in row).
When the cycle is left by ExitDo command, in the number of nest levels from command branching.
Designed syntax of each command:
Do
DoWhile
DoUntil
Loop
LoopWhile
LoopUntil
ExitDo
; where
•
evaluation occurs, an error is generated. If the control, after the error was handled, should return
to the next command then the expression is viewed as it evaluated to zero.
• The
word
While in the condition means, that the cycle is continued, if the expression value is
none zero
• The
word
Until in the condition means, that the cycle will continue, if the expression value is zero