April 2017
Intermediate to advanced
706 pages
17h 8m
English
A WHILE-DO control structure allows us to create a repetitive code loop that will DO (execute) a block of code WHILE a specific conditional expression evaluates to TRUE. WHILE-DO is different from REPEAT-UNTIL, both because it may need a BEGIN-END structure to define the block of code to be executed repetitively (REPEAT-UNTIL does not), and it has different timings for the evaluation of the exit condition.
The syntax of the WHILE-DO control structure is as follows:
WHILE <Condition> DO <Statement>
The Condition value can be any Boolean expression that evaluates to TRUE or FALSE. The Statement value can be simple or the most complex compound BEGIN-END statement. Most WHILE-DO loops will be based on a BEGIN-END block of code. The ...
Read now
Unlock full access