While
Repeats a series of statements while a specified condition is true.
Syntax
[label:] while condition do
statement; {statement;}
endwhile
label
Specifies a character string identifying each while statement. Allows an endloop statement to break out of a nested series of while statements to a specified level. The label precedes the keyword while, and is followed by a colon. Must be a unique alphanumeric identifier, and not a field name or keyword.
condition
Specifies a logical (Boolean) expression evaluating to True or False
Description
The 4GL while statement executes the series of statements between the keywords do and endwhile as long as the condition represented by the logical (Boolean) expression remains true. The condition is tested only at the start of each loop; if values change during execution of the loop so that the condition becomes false, execution continues through the current iteration of the statement list, unless an endloop statement is encountered.
Last modified date: 04/03/2024