Navigation:  ThinBASIC Language > Program Flow >

While/Wend

Previous pageReturn to chapter overviewNext page

 

Description

 

Define a block of program statements that are executed repeatedly for as long as certain conditions are met.

 

Syntax

 

WHILE Expression

 ...

 {statements}

 [EXIT WHILE]

 [ITERATE WHILE]

 {statements}

 ...

WEND

 

Returns

 

Parameters

 

Remarks

 

Expression can be any numeric, string, or mixed tests that at the end will be valuated to a numeric value of false (zero) or true (any value different from zero)

 

In order to left some time slice to statements executed inside While/Wend to handled windows events, While/Wend automatically execute a DoEvents at every cycle.

 

Restrictions

 

See also

 

Examples