Usage: IF (<expression>) <then-statement>
       IF (<expression>) {<then-statements>} [{<else-statements>}]

  IF tests the value of <expression> for truth or falsity.  An expression
  is returned as true as long as it is (1) non-empty, and (2) not zero;
  NULL strings are treated as zero.  If the expression returns true, the
  <then-statements> portion is executed.  If false, the <else-statements>
  portion is executed, if it is present.  Expressions are generally of
  the following forms:

    ( exp )             tests for existence of exp (usually a variable)
    ( exp1 == exp2 )    tests whether exp1 equals exp2
    ( exp1 != exp2 )    tests whether exp1 does not equal exp2
    ( exp1 && exp2 )    tests for existence of exp1 and exp2
    ( exp1 || exp2 )    tests for existence of exp1 or exp2 or both
    ( exp1 ^^ exp2 )    tests for existence of exp1 or exp2, not both
    ( exp1 <  exp2 )    tests whether exp1 is less than exp2
    ( exp1 >  exp2 )    tests whether exp1 is more than exp2
    ( exp1 <= exp2 )    tests whether exp1 is less than or equal to exp2
    ( exp1 >= exp2 )    tests whether exp1 is more than or equal to exp2

  Additionally, the negation operator, !, may be used to reverse the
  truth or falsehood of the expression, such as

    if ( !(exp1 < exp2) )

  which tests whether exp1 is NOT less than exp2 (which is the same as
  using the >= operator).  The expression (exp) is evaluated as though it
  were within a ${} construct, such that

    IF ( blah ) ...

  would expand "blah" to $blah, then test the value of $blah.  Variables
  can also be placed inside the regular parser, such that

    IF ( [$blah] ) ...

  is equivalent to the previous statement (though it isn't as efficient).
  Both forms may be combined in the same expression.  Numbers are treated
  as constants, so in order to expand numeric expandos, such as $0, you
  must use the regular parser, as above.  Strings must also be passed
  through the regular parser (otherwise they are interpreted as variables),
  and are compared case-insensitively.

  Statements may be composed of more than one command, and may or may not
  be composed of more than one line.  Statements must be surrounded by
  curly braces if (1) the THEN portion is more than one line long, or (2)
  an ELSE portion exists.  They are not required if the THEN portion is
  only a single command (and there is no ELSE), though they still may be
  used.  For example, both of the following IF statements are equivalent:

    IF ( foo == bar ) echo foo and bar are the same

    IF ( foo == bar ) {
       echo foo and bar are the same
    }

  As in C, there is no restriction as to where the braces may be placed.
  They may be alone on a line, on the same line as the IF statement, or
  wherever you choose to fit your coding style.  Of course, if you wanted
  to execute an additional command, or if you wanted to provide an
  alternative (ELSE statement), the braces would be required:

    IF ( foo == bar ) {
       echo foo and bar are the same
       echo that's so cool!
    }

    IF ( foo == bar ) {
       echo foo and bar are the same
    } {
       echo foo and bar are not the same
    }

  IF statements may also be imbedded, such as:

    IF ( foo ) {
       IF ( bar ) {
          echo foo and bar are the same
          echo that's so cool!
       }
    }

  Finally, you may also use assignment operators inside an IF expression.
  This is not always recommended, as it can make your code somewhat
  confusing, but it is nonetheless useful.  The following:

    if ( foo = 3 > bar )

  Would first set "foo" to the value of 3, then compare it with "bar".
  Gratuitous use of parentheses will aid in readability in cases such as
  these (especially when you aren't sure of operator precedence ;)).
  Remember that the "@" assignment command is not required (and in fact
  is not even allowed).

See Also:
  @
  UNLESS
  UNTIL
  WHILE
  expressions
