Tcl Source Code

View Ticket
Login
Ticket UUID: 959180
Title: bug in set: docs or implementation?
Type: Bug Version: obsolete: 8.4.6
Submitter: msofer Created on: 2004-05-24 01:07:05
Subsystem: 07. Variables Assigned To: msofer
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2004-05-25 02:26:31
Resolution: Accepted Closed By: msofer
    Closed on: 2004-05-24 19:26:31
Description:
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.
User Comments: msofer added on 2004-05-25 02:25:54:
Logged In: YES 
user_id=148712

committed to HEAD and core-8-4-branch

dkf added on 2004-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.

msofer added on 2004-05-24 16:39:40:

File Added - 88194: setn.patch

Logged In: YES 
user_id=148712

Can you please review the attachment?

dkf added on 2004-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.

Attachments: