<<

Contents

Search

>>

 

WHILE

 

 

Instruction

 

 

Syntax:

WHILE <Condition> DO … Instructions … ENDDO

 

<Condition> = <LOG-EXPRESSION>

 

Meaning:

WHILE loop.

 

As long as the logical expression <Condition> is true the instructions between DO and ENDDO are executed.

 

Parameter:

Condition

Logical expression

 

Sample:

/* Print numbers 1 to 100

I% = 0

WHILE I% < 100

DO I% = I% + 1

   LPRINT I%;

ENDDO

 

See also:

IF

FOR