Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2003-04-28
17:05 • Closed ticket [727563ffff]: bad mode default in switch compiled version plus... artifact: f947d84995 user: dkf
2003-04-26
05:11 • Ticket [727563ffff]: 5 changes artifact: 4b91765741 user: dkf
2003-04-25
23:07 • Ticket [727563ffff]: 5 changes artifact: 535991a99b user: msofer
22:53 • Ticket [727563ffff]: 1 change artifact: 0c01f4c221 user: beric
15:53 • New ticket [727563ffff]. artifact: f27b10839a user: beric

bad mode default in switch compiled version

Closed / Fixed727563ffffffffffffffffffffffffffffffffffCreated 24 years agoUpdated 24 years ago
Descriptionplain2003-04-25 15:53:05
Compiled switch uses -glob mode by default, whereas 
doc and Tcl_SwitchObjCmd use -exact mode.

---

proc test {} {
    # this one is compiled
    switch -- aa {
        a* {puts "glob"}
        aa {puts "exact"}
    }
    # not this
    switch aa {
        a* {puts "glob"}
        aa {puts "exact"}
    }
}

---

tclsh85 % test
glob
exact
tclsh85 %


See tclCompCmds.c 1.46, TclCompileSwitchCmd(), line 
2905.
beric Ticket [727563ffff]: 1 change [History diff]2003-04-25 22:53:48
msoferplain2003-04-25 23:07:30
Logged In: YES 
user_id=148712

assigning to Donal - I have not yet looked at this, and he
probably still has it cached in short-term memory
dkfplain2003-04-26 05:11:07
Logged In: YES 
user_id=79902

Rats.
dkf Closed ticket [727563ffff]. [History diff]2003-04-28 17:05:25
Log in (anonymous is fine) to add a comment.