Site Tools


until

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

until [2006/08/29 16:08]
until [2006/08/29 16:08] (current)
Line 1: Line 1:
 +# $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)