Overview
| Artifact ID: | 885607f1fb499dd0e663a09c7bdd16e78614afba |
|---|---|
| Ticket: | 1537233fffffffffffffffffffffffffffffffff
Switch doesn't variable substitution |
| User & Date: | dkf on 2006-08-09 17:04:23 |
Changes
- closedate changed to: "2006-08-09T10:04:23"
- closer changed to: "dkf"
- icomment:
Logged In: YES user_id=79902 It's not a bug. It's just Tcl's standard quoting rules, and everything *has* to be this way for reasons that are rather deeply embedded in the language's basic philosophy. But for this case, the other form of input to the [switch] command is probably useful. You are aware that what you wrote could also be (wholly equivalently) written like this: switch -- $value \ $one {puts 1} \ $two {puts 2} \ $three {puts 3} \ default {puts "$value is unknown"} Hope this helps. - login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Invalid"
- status changed to: "Closed"
- username: "dkf"