User Tools

Site Tools


until

# $EPIC: until.txt,v 1.2 2006/08/20 17:37:08 sthalik Exp $

Synopsis:

until (<condition>) [{] <action> [}]

Description:

The UNTIL loop is the inverse of the WHILE loop; it performs the given <action> so long as <condition> is false.

The <condition> is evaluated in “expression mode”. The <action> is evaluated in “text mode”. The curly-braces around <action> are recommended, but optional.

Examples:

To display a warning message 3 times:

    @ xx = 3
    until ( xx == 0 ) {
       echo WARNING!  This ship will self destruct in $xx seconds!
       @ xx--
    }

A infinite loop that behaves like the Unix 'yes' command:

    until ( 0 ) echo yes

History:

The UNTIL command first appeared in EPIC3.

until.txt · Last modified: 2006/08/29 16:08 (external edit)