1mNAME0m
       case - Evaluate one of several scripts, depending on a given value

1mSYNOPSIS0m
       1mcase 4m22mstring24m ?1min22m? 4mpatList24m 4mbody24m ?4mpatList24m 4mbody24m ...?

       1mcase 4m22mstring24m ?1min22m? {4mpatList24m 4mbody24m ?4mpatList24m 4mbody24m ...?}


1mDESCRIPTION0m
       4mNote:24m  4mthe24m  1mcase 4m22mcommand24m 4mis24m 4mobsolete24m 4mand24m 4mis24m 4msupported24m 4monly24m 4mfor24m 4mbackward0m
       4mcompatibility.24m  4mAt24m 4msome24m 4mpoint24m 4min24m 4mthe24m 4mfuture24m 4mit24m 4mmay24m 4mbe24m 4mremoved24m 4mentirely.0m
       4mYou24m 4mshould24m 4muse24m 4mthe24m 1mswitch 4m22mcommand24m 4minstead.0m

       The  1mcase  22mcommand matches 4mstring24m against each of the 4mpatList24m arguments
       in order.  Each 4mpatList24m argument is a list of one or more patterns.  If
       any  of these patterns matches 4mstring24m then 1mcase 22mevaluates the following
       4mbody24m argument by passing it recursively  to  the  Tcl  interpreter  and
       returns  the result of that evaluation.  Each 4mpatList24m argument consists
       of a single pattern or list of patterns.  Each pattern may contain  any
       of  the wild-cards described under 1mstring match22m.  If a 4mpatList24m argument
       is 1mdefault22m, the corresponding body will  be  evaluated  if  no  4mpatList0m
       matches  4mstring24m.   If no 4mpatList24m argument matches 4mstring24m and no default
       is given, then the 1mcase 22mcommand returns an empty string.

       Two syntaxes are provided for the  4mpatList24m  and  4mbody24m  arguments.   The
       first  uses  a separate argument for each of the patterns and commands;
       this form is convenient if substitutions are desired  on  some  of  the
       patterns  or  commands.  The second form places all of the patterns and
       commands together into a single argument; the argument must have proper
       list  structure,  with  the elements of the list being the patterns and
       commands.  The second form makes it easy to construct  multi-line  case
       commands, since the braces around the whole list make it unnecessary to
       include a backslash at the end of each line.  Since the  4mpatList24m  argu-
       ments  are in braces in the second form, no command or variable substi-
       tutions are performed on them;  this makes the behavior of  the  second
       form different than the first form in some cases.


1mSEE ALSO0m
       switch(n)


1mKEYWORDS0m
