Executes one or more statements iteratively while a condition is true. Checks the condition after executing the statements.
@DoWhile( statement ; ... ; condition )
statement
A formula language statement. The maximum number of statements you can include is 254.
condition
Expression that returns a value of True (1) or False (0).
true
True (1) unless an error occurs during execution of the condition. An "unexpected data type" error occurs if the conditional expression results in a non-numeric value.
@DoWhile executes the statements then evaluates the condition. If the condition is True (1), @DoWhile executes the statements and evaluates the condition again. If the condition is False (0), @DoWhile terminates.
@If(@Elements(Categories) = 0; @Return(0); "");
n := 1;
@DoWhile(
@Prompt([OK]; "Category " + @Text(n); Categories[n]);
n := n + 1;
n <= @Elements(Categories)
)
Do statement of LotusScript® language