Skip to content
Tcl Source Code Artifact [e83d8ddb57]
Login

Artifact [e83d8ddb57]

Artifact e83d8ddb575e922292f4949fef1e566e22790918:

Ticket change [e83d8ddb57] - New ticket [2673163fffffffff|2673163fff] <i>Unwanted integer affinity of [upvar]</i>. by ferrieux on 2009-03-08 21:40:01.
D 2009-03-08T21:40:01
J assignee dkf
J cmimetype text/plain
J comment The\sdocumentation\sfor\s[upvar]\ssays:\n\n\s\supvar\s?level?\sotherVar\smyVar\s?otherVar\smyVar\s...?\n\nwhich\smakes\sit\spretty\sclear\sthat\sthe\spresence\sof\sa\slevel\sis\sdetermined\sby\sthe\sparity\sof\sthe\snumber\sof\sargs:\sodd\smeans\slevel,\seven\smeans\sno\slevel.\n\nHowever,\s"upvar\s1\sx"\sraises\sa\s"wrong\s#\sargs"\serror\s!\n\nThis\sis\sdue\sto\sthe\sfact\sthat\sthe\simplementation\sascribes\shigher\spriority\sto\sthe\svalue\sof\sthe\sfirst\sargument\s("integer\saffinity")\sthan\sto\spositional\scriteria.\n\nThis\sis\sBad\sThing\s(1)\sas\sit\sdoesn't\swork\sas\sdocumented\sand\s(2)\sas\sit\sinduces\smore\sverbose\sstyle,\snullifying\sthe\sintention\sof\sthe\s"default\slevel\s1":\sprogrammers\snow\sroutinely\swrite\s"upvar\s1\s$x\sy"\sinstead\sof\sthe\sequivalent\s"upvar\s$x\sy"\sin\sfear\sof\sthe\sabove,\sinsane\sbehavior\sfor\san\sincoming\sinteger-named\svariable.\n\nSo\sI\spost\sthis\sreport\sproposing,\sas\sa\sfix,\sto\sjust\sdo\sas\sdocumented.\sThat\sis,\s"upvar\s1\sx"\sshould\shave\sthe\ssame\seffect\sas\s"upvar\s1\s1\sx".\n\nPrio\s8\sas\s"low-hanging\sfruit"\ssince\s(1)\sthe\spatch\sis\strivial\sand\s(2)\sthe\sfix\sturns\serror\scases\sinto\svalid\sbehavior\sin\sa\sway\sthat\sreally\scannot\sharm\sa\ssane\sprogram.\n\nPatch\sto\sbe\sshortly\suploaded.\n\n\s\s
J foundin None
J is_private 0
J priority 8
J resolution None
J status Open
J submitter ferrieux
J subsystem 18.\sCommands\sM-Z
J title Unwanted\sinteger\saffinity\sof\s[upvar]
J type Bug
K 2673163fffffffffffffffffffffffffffffffff
U ferrieux
Z 214ec1dedeb4a52b20540160adf1510c