1mNAME0m
       if - Execute scripts conditionally

1mSYNOPSIS0m
       1mif  4m22mexpr124m  ?1mthen22m?  4mbody124m  1melseif  4m22mexpr224m  ?1mthen22m? 4mbody224m 1melseif 22m... ?1melse22m?
       ?4mbodyN24m?


1mDESCRIPTION0m
       The 4mif24m command evaluates 4mexpr124m as an expression (in the same  way  that
       1mexpr  22mevaluates  its  argument).  The value of the expression must be a
       boolean (a numeric value, where 0 is false and anything is true,  or  a
       string  value  such as 1mtrue 22mor 1myes 22mfor true and 1mfalse 22mor 1mno 22mfor false);
       if it is true then 4mbody124m is executed by passing it to  the  Tcl  inter-
       preter.   Otherwise  4mexpr224m  is  evaluated as an expression and if it is
       true then 1mbody2 22mis executed, and so on.  If  none  of  the  expressions
       evaluates  to true then 4mbodyN24m is executed.  The 1mthen 22mand 1melse 22marguments
       are optional ``noise words'' to make the command easier to read.  There
       may be any number of 1melseif 22mclauses, including zero.  4mBodyN24m may also be
       omitted as long as 1melse 22mis omitted too.  The return value from the com-
       mand  is  the  result of the body script that was executed, or an empty
       string if none of the expressions was non-zero and there was no  4mbodyN24m.


1mSEE ALSO0m
       expr(n), for(n), foreach(n)


1mKEYWORDS0m
