Your IP : 216.73.216.48


Current Path : /usr/X11R6/share/epic5/help/5_Programming/
Upload File :
Current File : //usr/X11R6/share/epic5/help/5_Programming/unless

# $EPIC: unless,v 1.2 2005/03/11 04:55:04 jnelson 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.
   }

See also:
   if(5)

History:
   The UNLESS command first appeared in EPIC3.