Syntax
while expression
commands
endwhile
Description
The while command repeatedly executes the commands while the expression is true. If the expression is true, the commands following the while are executed. At the endwhile, control goes back to the while command, and the expression is evaluated again. If it is true, the process repeats. When the expression is false, control goes to the command following endwhile.
While commands can be nested to any level. A while command can appear as a command within a while command.
The built-in while command is only available when the built-in menu commands are enabled.
Example
ask "What is the quantity (1-5)?" as integer to quan
while quan <1| quan > 5
echo "The quantity must be between 1 and 5."
ask "What is the quantity (1-5)?" as integer to quan
endwhile