Tcl Source Code

View Ticket
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Ticket UUID: 1881284
Title: [variable] should cope with no arguments
Type: RFE Version: None
Submitter: coldstore Created on: 2008-01-28 17:12:17
Subsystem: 07. Variables Assigned To: dgp
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2009-10-02 02:13:41
Resolution: Accepted Closed By: dgp
    Closed on: 2009-10-01 19:13:41
Description:
By analogy with 1671880 [variable] should be modified to permit no arguments.

This enhancement would be useful for the following idioms:
User Comments: dgp added on 2009-10-02 02:13:41:
allow_comments - 1

dgp added on 2009-10-02 02:13:37:
this is done.

nijtmans added on 2008-11-07 16:54:00:
Isn't this already done in the TIP #323 implementation?

msofer added on 2008-08-06 19:40:29:
Logged In: YES 
user_id=148712
Originator: NO

This looks like a valuable RFE to me, I'd even extend it to [global], [upvar], [namespace upvar]. But it does require a simple TIP, as the docs (and tests) need changing.

dgp added on 2008-06-30 01:29:34:
Logged In: YES 
user_id=80530
Originator: NO


Since [variable] takes alternating
arguments to represent varname and values,
I think the idiom is:

proc foo {dict} {
    variable {*}$dict
}

coldstore added on 2008-06-29 07:03:02:
Logged In: YES 
user_id=19214
Originator: YES

proc foo {args} {
  variable {*}$args
}

is the idiom I was thinking of.

msofer added on 2008-06-28 23:04:12:
Logged In: YES 
user_id=148712
Originator: NO

messagw truncated: which idioms?