Repetitil'eStatement = WhileStaten 'lit I RepeatStatement I ForStatement . 

## 9.2.3.1. While statement. 

WhileStatement = "while" Booft IIIFxpression "do" Statement. 

The statement is repeatedly e.\ecuted until the expression becomes false, If its value is false at the be~ inning, the statement is not executed at all. The while statement 

while B do S 

is equivalent to (unless S contain~ u labelled statement): 

Examples of while statements: 

## 9.2.3.2. Repeat statements. 

if B then begin S; w: i le B do Send 

while GrayScale[1] < while I > 0 do begin 10 I ,- succ(1) if odd (I) then Y: Y * X; I ,- I di v 2; X := sqr(X) end while not eof(F) do bE Jin p(Fi); Get(F) end 

RepeatStatement = "repeat" Stal, '111£'lltSequence "unt i I" B{)(,ic(/llE.rpression. 

The statement sequence is rep,'utcdly executed (and at least once) until the expression becomes true The repeat statement 

is equivalent to 

repeat S until B 

begin S; if not B tl r repeat S until Bend 

unless S contains a labelled state \lent. 

Examples of repeat statements: 

repeat K ,- I mod J; repeat P (Fi); Get(F) until eof (F) ,- J; J ,- K until J o 

