The while Statement
The while statement further extends the Objective-C language’s repertoire of looping capabilities. The syntax of this frequently used construct is as follows:
while ( expression ) program statement
The expression specified inside the parentheses is evaluated. If the result of the expression evaluation is true, the program statement that immediately follows is executed. After execution of this statement (or statements, if enclosed in braces), expression is again evaluated. If the result of the evaluation is true, the program statement is again executed. This process continues until expression finally evaluates false, at which point the loop is terminated. Execution of the program then continues with the statement that follows ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access