Equinox Online Help - Language Reference - A to Z
While ... End While |
|
---|---|
Applies to | |
Syntax | While TestExpressionstatementsend while Note that you may use EndWhile instead of End While. |
Action | [Statement] The enclosed statements repeat while the test expression is True. |
Scope | Usable anywhere. |
Notes | TestExpression is evaluated. If it is True, the statements enclosed between While and End While execute. This repeats until TestExpression evaluates to False. Exit While passes control to the statement following End While. Continue While passes control back to the While statement. You may nest While statements to as many levels as required. Note that unlike the Repeat statement the enclosed statements will not be executed if the condition is evaluated False on the first examination. |
Category | Flow Control |
See Also | Block_EndBlock, BreakPressed, Continue, Execute, EnableInput, Exit, For...Next, Goto, If_Then, Repeat_EndRepeat, Repeat_Until, Return, Sleep, Subtable, Switch |
Example | This method sets up a daily call list for a salesman, containing prospects whose potential sales value (held in the field ProspectValue) is not zero and who have no salesman allocated to them (held in ProspectCaller). The While statement limits the number of prospects to fifty. If the last prospect is reached before fifty are found, then SysError is set non-zero and an Exit While statement is used to close the loop. number NoFound |