switch(3tcl) Tcl Built-In Commands switch(3tcl) ______________________________________________________________________________ NAME switch - SYNOPSIS switch ?options? string pattern body ?pattern body ...? switch ?options? string {pattern body ?pattern body ...?} ______________________________________________________________________________ DESCRIPTION switch pattern () string pattern string() body Tcl pattern default pattern string switch switch - : -exact string -glob string ( string match ) -regexp string ( re_syntax ) -- - string pattern body switch pattern body ``-'' body ("-") body switch switch : switch abc a - b {format 1} abc {format 2} default {format 3} 2, switch -regexp aaab { ^a.*b$ - b {format 1} a* {format 2} default {format 3} } 1, switch xyz { a - b { # Correct Comment Placement format 1 } a* {format 2} default {format 3} } 3. SEE ALSO for(n), if(n), regexp(n) KEYWORDS switch, match, regular expression [] [] 2001/11/15 Linux man : http://cmpp.linuxforum.net man man https://github.com/man-pages-zh/manpages- zh Tcl 7.0 switch(3tcl)