Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2010-01-23
06:38 • Closed ticket [1970629fff]: proc should document effect on current namespace... artifact: e8a1a67eb7 user: dkf
2009-05-01
08:33 • Ticket [1970629fff]: 1 change artifact: 43062e001f user: msofer
2008-06-28
22:08 • Ticket [1970629fff]: 1 change artifact: b1afb72bb2 user: msofer
2008-05-24
04:03 • Ticket [1970629fff]: 2 changes artifact: cf97002266 user: dkf
2008-05-23
22:52 • Ticket [1970629fff]: 1 change artifact: bda65e1b9d user: dnew
15:52 • New ticket [1970629fff]. artifact: f0a6943748 user: dnew

proc should document effect on current namespace

Closed / Fixed1970629fffffffffffffffffffffffffffffffffCreated 19 years agoUpdated 17 years ago
Descriptionplain2008-05-23 15:52:05
I've noticed that the documentation for [proc] has never clarified that *invoking* a proc defined in a different namespace changes the default namespace. 

namespace eval xyz {
    proc hello {} { puts [namespace current] }
}
puts [namespace current]
xyz::hello


Nowhere in the documentation that I could find describes that the two "puts" statements will output different information. (I don't remember why I was looking for this, but it was confusing enough to me that I think it's worth adding a line to the [proc] man page saying that invoking the proc in a namespace changes the current namespace.)
dnew Ticket [1970629fff]: 1 change [History diff]2008-05-23 22:52:33
dkf Ticket [1970629fff]: 2 changes [History diff]2008-05-24 04:03:20
msofer Ticket [1970629fff]: 1 change [History diff]2008-06-28 22:08:51
msofer Ticket [1970629fff]: 1 change [History diff]2009-05-01 08:33:23
dkfplain2010-01-23 06:38:49
allow_comments - 1

Only fixing this for the HEAD
Log in (anonymous is fine) to add a comment.