Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 7cd415845f4f2323454a5484c2c69fa9730a8bf5
Ticket: 1017884fffffffffffffffffffffffffffffffff
make 'level' arg to uplevel/upvar mandatory
User & Date: msofer on 2004-08-28 04:14:06
Changes

  1. icomment:
    Logged In: YES 
    user_id=148712
    
    My first reaction to this is: always specify the level, do
    not rely on the default!
    
    My second reaction is: how do you think this could be fixed?
    One idea is to assume that, if there is just one argument to
    uplevel and it is a pure list, it has to be a script and we
    could avoid parsing it. But then the following script would
    have a different behaviour:
    
      % proc 1 {} {puts hi}
      % proc a {} {uplevel [list 1]}
      % a
      wrong # args: should be "uplevel ?level? command ?arg ...?"
    
    So now the question is: is this just a performance bug, or a
    real bug? Ie, should that script print "hi" or return an
    error as it does now?
    
    
  2. login: "msofer"
  3. mimetype: "text/plain"
  4. username: "msofer"