Site Tools


unless
no way to compare when less than two revisions

Differences

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


unless [2006/08/29 16:08] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +# $EPIC: unless.txt,v 1.2 2006/08/20 17:37:08 sthalik Exp $
 +======Synopsis:======
 +__unless__ (<condition>) <then>
 +__unless__ (<condition>) { <then> } [{ <else> }] \\
 +__unless__ (<condition>) { <then> } elsif (<condition>) { <then> } else { <then> } \\
 +__unless__ (<condition>) { <then> } elif (<condition>) { <then> } \\
 +__unless__ (<condition>) { <then> } else if (<condition>) { <then> } \\
 +
 +======Description:======
 +__UNLESS__ is the inverse of the [[IF]] command.  If <condition> is
 +FALSE then <then> is is executed.  If <condition> is TRUE then any further
 +else oe elseif conditions are parsed until a <condition> is found that is
 +FALSE.  Note that even though the word "elsif" and "elif" are used, that
 +does not change that it is looking for a <condition> that is FALSE.
 +
 +For all the other gory details, see the [[IF]] help file.
 +
 +======Examples:======
 +   unless (1 == 1) {
 +      echo 1 == 1.  This is not executed, because 1 == 1 is TRUE
 +   } elsif (1 == 0) {
 +      echo 1 == 0.  This is executed because 1 == 0 is FALSE.
 +   } else {
 +      echo ha!  This is not executed because 1 == 0 is FALSE.
 +   }
 +
 +======History:======
 +The __UNLESS__ command first appeared in EPIC3.
  
unless.txt · Last modified: 2006/08/29 16:08 by 127.0.0.1