Artifacts Associated With Ticket 218253
Ticket change [bcbe4f4ecb] (rid 101805) by nobody on 2000-10-26 00:55:04:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 2860 Bug Version: 8.1 SubmitDate: '1999-09-21' LastModified: '1999-09-28' Severity: MED Status: Closed Submitter: techsupp ChangedBy: hobbs OS: Solaris OSVersion: 2.6.1 Machine: Other FixedDate: '2000-10-25' ClosedDate: '1999-09-28' Name: William Yan Comments: To keep comment systax consistent, require user put curly braces "{...}" around the pattern or add backslash "\" right before hashmark "#" if he/she do want to treat the hashmark "#" as a pattern. ReproducibleScript: #!/bin/sh #Start Tclsh exec tclsh $0 $@ switch -regexp [lindex $argv 0] { # branch1: get input string "a" a {puts "input is a"} b {puts "input is b"} default {puts "input is neither a nor b"} } The above is the content of executable script file. Just run it in Unix shell. ObservedBehavior: The interprete look the first line in switch body # branch1: get input string "a" as a real branch although as my intent it was comment. And the interprete then reports error. DesiredBehavior: Add comments in switch body. This sort of comment placement is user error, as specifically stated in the switch man page. The man page has been further updated for 8.3b1 to include an example of proper comment placement. -- 09/28/1999 hobbs - foundin initialized to: "obsolete: 8.1"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "69. Other"
- title initialized to: "comment sign (#) in switch body"
- type initialized to: "Bug"
Ticket change [ea6cdb830c] (rid 103380) by welch on 2000-10-26 08:17:55:
- closedate changed to: "2000-10-26T01:17:55"
- closer changed to: "welch"
- priority changed to: "2"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [ca0885736e] (rid 122392) by dgp on 2001-04-18 06:36:24:
- closedate changed to: "2001-04-17T23:36:24"
- closer changed to: "dgp"
- subsystem changed to: "18. Commands M-Z"