Did you try [switch $status { . . . ? Paul Higham Tel +1 408 522 6225 phig...@sjm.com
-----Original Message----- From: fossil-users-boun...@lists.fossil-scm.org [mailto:fossil-users-boun...@lists.fossil-scm.org] On Behalf Of Ron Wilson Sent: Thursday, February 17, 2011 16:03 To: fossil-users@lists.fossil-scm.org Subject: [fossil-users] switch statement Does TH1 implement switch or am I using it wrong? The TCL (yes, I know TH1 is not TCL, only derived from it) docs at http://www.tcl.tk/man/tcl8.5/TclCmd/switch.htm say the switch returns the result of evaluating the body associated with the matching pattern, so that is what I tried: set status_choices [ switch status { New {expr { New Verified Deferred Closed }} Verified {expr { Verified Fixed Deferred }} Fixed {expr { Fixed Tested Deferred }} Tested {expr { Tested Review Deferred }} Review {expr { Review Closed Deferred }} Deferred {expr { Deferred Review Closed }} Closed {expr { Closed Review Deferred }} defaull {expr { Review }} } ] However, I get a "no such command: switch" error. _______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users This communication, including any attachments, may contain information that is proprietary, privileged, confidential or legally exempt from disclosure. If you are not a named addressee, you are hereby notified that you are not authorized to read, print, retain a copy of or disseminate any portion of this communication without the consent of the sender and that doing so may be unlawful. If you have received this communication in error, please immediately notify the sender via return e-mail and delete it from your system. _______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users