Command: do

Syntax

do <command_block> while (<condition>)

or

do <command_block> until (<condition>)

Description

Execute a command or block of commands until a condition has a false (or true) value.

Parameters

Switches

None

Notes

Any non-zero numeric or point, or any non-null string is considered true when evaluating <condition>.

This command cannot have events assigned to it.

A jump to the end of the do block may be made with the continue command. A break out of the do block may be made with a break command.

Examples

Execute one command.

do x = x/5; until (x < 10)

Execute a command block.

numeric x = 1, maxval = array.alength
do {
    if (array[x] >= 0) tell <’element’,x,’is positive’>
    else tell <’element’,x,’is negative’>
} while (x <= maxval )

See Also

Commands:

until, while

Identifiers:

cond_precision (numeric)