While loop (SDL script)
A While loop processes a set of statements until a specified condition is no longer true.
While loops can be nested.
The While loop uses the following keywords:
%while - starts the While loop and specifies the condition to be evaluated. While the condition is true, the set of statements specified by the While loop are processed. For information about working with variables, item properties, item lists and operators, see the following topics:
%exit - optional keyword for exiting the While loop without processing any remaining statements. %exit keyword is typically used with the evaluation of a condition.
%endwhile - ends the While loop
Syntax
%while <condition>
<set of statements for when condition is satisfied>
[%exit]
%endwhile