.
D 2007-07-18T09:42:08
J assignee nobody
J cmimetype text/plain
J comment See\sdiscussion\shere:\nhttp://groups.google.com/group/comp.lang.tcl/browse_thread/thread/e0a7179c3c55bab5/2ea134e0b6662b9b?hl=en#2ea134e0b6662b9b\n\nThis\spart\sof\sthe\sdocumentation\sof\s'trace'\sis\sconfusing\sbecause\sit\suses\sthe\sword\s'command'\sin\sseveral\sdifferent\smeanings,\sin\sadjacent\ssentences.\sFrom\sthe\scurrent\stext\sabout\strace,\swith\spieces\s*marked*:\n\n--------------------------\ntrace\sadd\sexecution\sname\sops\s*command*\n\nArrange\sfor\s*command*\sto\sbe\sexecuted\swhenever\s*command*\sname\sis\sexecuted\n[..]\n\nenterstep\n\nInvoke\s*command*\sfor\severy\sTcl\s*command*\swhich\sis\sexecuted\sinside\sthe\n*procedure*\sname,\sjust\sbefore\sthe\sactual\sexecution\stakes\splace.\sFor\nexample\sif\swe\shave\s'proc\sfoo\s{}\s{\sputs\s"hello"\s}',\sthen\san\senterstep\ntrace\swould\sbe\sinvoked\sjust\sbefore\sputs\s"hello"\sis\sexecuted.\sSetting\nan\senterstep\strace\son\sa\s*command*\swill\snot\sresult\sin\san\serror\sand\sis\nsimply\signored.\n\nleavestep\n\nInvoke\s*command*\sfor\severy\sTcl\s*command*\swhich\sis\sexecuted\sinside\sthe\nprocedure\sname,\sjust\safter\sthe\sactual\sexecution\stakes\splace.\sSetting\na\sleavestep\strace\son\sa\s*command*\swill\snot\sresult\sin\san\serror\sand\sis\nsimply\signored.\s\n-------------------------\n\nI\spropose\schanging\sit\sto\ssomething\salong\sthese\slines:\n\ntrace\sadd\sexecution\sname\sops\s*script*\n\nArrange\sfor\s*script*\sto\sbe\sexecuted\swhenever\s*command*\sname\sis\sexecuted[..]\n\nInvoke\s*script*\sfor\severy\sTcl\s*command*\s[..]\n\nSetting\san\senterstep\strace\son\sa\s*command\sthat\sis\snot\sa\sproc\s("Tcl\sBuild-\nIn\scommands"\sor\sa\scommand\sprovided\sby\sa\scompiled\sextension)*\swill\snot\s[..]\s\n\n\n-\sChanging\sthe\sfirst\s'command'\sto\sscript\swill\sreduce\sthe\suses\sof\scommand\sin\sa\sdifferent\smeaning\sfrom\s4\sto\s3.\n-\sThe\slast\suse\sof\scommand\sneeds\ssome\sform\sof\squalification,\ssince\swithout\sit,\sthe\stext\sbasically\ssays:\s"Run\sscript\swhenever\sa\scommand\sx\sis\sexecuted.\sIt\sis\sok\sto\spass\sa\scommand\sas\sx."\sand\sthat\sseems\sto\ssay\sthe\ssame\sthing\stwice.\n-\sI\sstill\sthink\shaving\sthe\soverall\stext\stalk\sabout\sthe\s'command\sname',\sthen\shaving\sthe\sdetails\slike\sfor\senterstep\stalk\sabout\sthe\s'procedure\sname'\sis\sconfusing,\showever\sI\scannot\ssuggest\sanything\sbetter\sas\sI\s(now)\sunderstand\sthat\sfor\senter\sand\sleave\sit\sreally\sis\sany\scommand,\swhile\sfor\senterstep\sand\sleavestep\sit\sis\sonly\suseful\sif\scommand\sis\sa\sprocedure.
J foundin obsolete:\s8.4.14
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter legolas_a20
J subsystem 69.\sOther
J title trace\sdocumentation\sis\sconfusing
J type Bug
K 1755984fffffffffffffffffffffffffffffffff
U legolas_a20
Z 6f7e27c473f4b30b44b42ccfd2bd062b