WHILE

Summary


"while" is used to carryout loops whilst a condition is met.

Syntax

   While expr_l
    ..... instructions
   Wend

Parameters

Element

Description

Restrictions

expr_l

Logical_expression

None.

Examples

   # Time-out loop
    I = time
   # Loop calculations with a time-out of 10 seconds
    TRUE = 1
   
While TRUE
      # Loop ...
    Wend

Description and comments

"while" is used to carryour loops whilst a condition is true (that is to say the corresponding numeric expression is not null). The only ways of exiting the loop are :

Number of iterations : if the condition is false from the start, the loop will never carried out. If not the loop will be carried out until the condition becomes false.

Associated errors

Error

Description

ERMODE (10)

expr_l is not of the numeric type.

Associated keywords

BREAK - REPEAT


SUMMARY]


Copyright © Sage 1999 - 2007