2 Loop Constructs
if unless whenIf the specified condition is true, the succeeding loop clause is executed. If the specified condition is not true, the succeeding clause is skipped, and program control moves to the clause that follows the loop keyword
else
. If the specified condition is not true and noelse
clause is specified, the entire conditional construct is skipped. The conditionally executable statement must begin with the loop keywordif
,then
, orunless
. You can connect several clauses into one compound clause with the loop keywordand
.
The loop keywordsif
andwhen
are synonyms; you can use them interchangeably.
Generated with Harlequin WebMaker