Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 885607f1fb499dd0e663a09c7bdd16e78614afba
Ticket: 1537233fffffffffffffffffffffffffffffffff
Switch doesn't variable substitution
User & Date: dkf on 2006-08-09 17:04:23
Changes

  1. closedate changed to: "2006-08-09T10:04:23"
  2. closer changed to: "dkf"
  3. 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.
    
    
  4. login: "dkf"
  5. mimetype: "text/plain"
  6. resolution changed to: "Invalid"
  7. status changed to: "Closed"
  8. username: "dkf"