Skip to content
Tcl Source Code View Ticket
Login

View Ticket

bug in set: docs or implementation?

Closed / Accepted959180ffffffffffffffffffffffffffffffffffCreated 23 years agoUpdated 23 years ago
Descriptionplain2004-05-24 01:07:05
The manpage set.n says: "If no procedure is active,
then varName refers to a namespace variable (global
variable if the current namespace is the global
namespace)."

But
  % set x 1
   1
  % namespace eval a set x 2 ;# namespace var!
   2
  % set x ;# global var was set
  2
  % set a::x ;# namespace var not created
  can't read "a::x": no such variable

The manpage should probably refer to namespace.n for
details of the namespace resolution rules.
dkfplain2004-05-24 15:40:49
Logged In: YES 
user_id=79902

I agree that something is wrong, but I've no idea what the
problem is.  (OK, the problem is the bizarre resolver, but
we knew that already!)

Not my maintenance area, but I'm happy to review any doc
changes you want doing.
msoferplain2004-05-24 16:39:40
File Added - 88194: setn.patch

Logged In: YES 
user_id=148712

Can you please review the attachment?
dkfplain2004-05-24 17:13:53
Logged In: YES 
user_id=79902

Looks fine to me.  Make it so, and consider backporting to
8.4 too.
msoferplain2004-05-25 02:25:54
Logged In: YES 
user_id=148712

committed to HEAD and core-8-4-branch
msofer Closed ticket [959180ffff]. [History diff]2004-05-25 02:26:31
Log in (anonymous is fine) to add a comment.

Attachments: