Skip to content
Tcl Source Code Artifact [8ae37f9f6e]
Login

Artifact [8ae37f9f6e]

Artifact 8ae37f9f6e1d5df63b4151b080feaf48b2b8e1bd:

Ticket change [8ae37f9f6e] - New ticket [50f67a3acef090c7|50f67a3ace] <i>INST_START_CMD bug?</i>. by msofer on 2014-11-27 20:02:24.
D 2014-11-27T20:02:24.030
J assignee nobody
J closer nobody
J cmimetype text/x-fossil-wiki
J comment There\sseems\sto\sbe\sa\sproblem\swith\scommands\sredefining\sthemselves\sin\stheir\sown\sarguments.\sConsider\sthe\sscript\r\n\r\n<verbatim>\r\n\s\smig@MTP:~/DEVEL/tcl-core/trunk/unix$\scat\sTT\s\r\n\s\sproc\shistory\sargs\s{}\r\n\s\sset\sx\s[proc\sset\sargs\s{puts\sFOO}]42\r\n\s\sputs\s$x\r\n</verbatim>\r\n\r\nThere\sare\s3\sways\sin\swhich\swe\scan\srun\sthis:\s'./tclsh\sTT',\s'source\sTT',\sor\styping\sit\sdirectly\sat\sthe\scommand\sline.\sThe\sfirst\sworks\sproperly:\sthe\scommand\s[set]\sis\sreplaced\s*before*\sit\sis\sused,\sthe\svariable\sx\sis\snever\sset.\r\n\r\nThe\sthird\svariant,\styping\sit\sat\sthe\scommand\sline,\smisbehaves\ssince\s...\sforever?\sDoing\sthis\ssets\sthe\svariable\sx\sto\s42,\sthe\scommand\s[set]\sis\sredefined\s*after*\sit\sis\sused.\r\n\r\nThe\ssecond\svariant\sused\sto\swork\sproperly\suntil\s[42090a4d6],\swhere\sit\sstarted\sreplacing\safter\suse.
J foundin 8.6.3
J is_private 0
J login msofer
J priority 5\sMedium
J private_contact 214bb5765a5d2d4513fe393de9e8c8431e3e869a
J resolution None
J severity Minor
J status Open
J submitter msofer
J subsystem 47.\sBytecode\sCompiler
J title INST_START_CMD\sbug?
J type Bug
K 50f67a3acef090c734090bb894ca42445b2f3d0c
U msofer
Z 60b0706c0e1ab57070d0ba8501ff6f71