Skip to content
Tcl Source Code Artifact [99bc00cb3b]
Login

Artifact [99bc00cb3b]

Artifact 99bc00cb3bdb1eb7ca0723a45bef9c1a770f6568:

Ticket change [99bc00cb3b] - New ticket [2134049fffffffff|2134049fff] <i>info frame documentation error</i>. by lars_h on 2008-09-28 12:11:14.
D 2008-09-28T12:11:14
J assignee dkf
J cmimetype text/plain
J comment The\sdescription\sof\swhat\s[info\sframe]\sdoes\swhen\sgiven\sa\spositive\slevel\sargument\sis\sas\sfollows:\n\n\s\sIf\snumber\sis\spositive\s(>\s0)\sthen\sit\sselects\sa\sparticular\s\n\s\sstack\slevel\s(1\srefers\sto\sthe\stop-most\sactive\scommand,\s\n\s\si.e.,\sinfo\sframe\sitself,\s2\sto\sthe\scommand\sit\swas\scalled\s\n\s\sfrom,\sand\sso\son)\n\nHowever,\s[info\sframe]\sis\sin\spractice\salmost\snever\sthe\stop-most\sactive\scommand,\sso\sthis\sis\swrong.\sDefining\n\nproc\snest\s{levels}\s{\n\s\sif\s{$levels<1}\sthen\s{\n\s\s\s\sfor\s{set\sn\s1}\s{$n<=[info\sframe]}\s{incr\sn}\s{\n\s\s\s\s\s\sputs\s[format\s{%d:\s%s}\s$n\s[info\sframe\s$n]]\n\s\s\s\s}\n\s\s}\selse\s{\n\s\s\s\snest\s[incr\slevels\s-1]\n\s\s}\n}\n\none\sgets\n\n%\snest\s3\n1:\stype\seval\sline\s1\scmd\s{nest\s3}\slevel\s4\n2:\stype\sproc\sline\s7\scmd\s{nest\s[incr\slevels\s-1]}\sproc\s::nest\slevel\s3\n3:\stype\sproc\sline\s7\scmd\s{nest\s[incr\slevels\s-1]}\sproc\s::nest\slevel\s2\n4:\stype\sproc\sline\s7\scmd\s{nest\s[incr\slevels\s-1]}\sproc\s::nest\slevel\s1\n5:\stype\sproc\sline\s4\scmd\s{info\sframe\s$n}\sproc\s::nest\slevel\s0\n\ni.e.,\sit\sis\s[info\sframe\s[info\sframe]]\sthat\sselects\sthe\sinfo\sframe\scall\sitself.\n\nAlso\swrong\sis\sthe\sclaim\sthat\s[info\sframe\s2]\sprovides\sinformation\sabout\sthe\scommand\sfrom\swhich\s[dict\sget\s[info\sframe\s1]\scmd]\swas\scalled,\ssince\sthe\sabove\sshows\sit\sis\sreally\sthe\sother\sway\saround:\s[dict\sget\s[info\sframe\s1]\scmd]\scaused\s[dict\sget\s[info\sframe\s2]\scmd]\sto\sbe\scalled.\n\nThe\scorresponding\ssentence\sin\sthe\sdescription\sof\s[info\slevel]\sdescribes\sthese\srelationships\scorrectly:\n\n\s\sIf\snumber\sis\spositive\sthen\sit\sselects\sa\sparticular\sstack\slevel\s\n\s\s(1\srefers\sto\sthe\stop-most\sactive\sprocedure,\s2\sto\sthe\s\n\s\sprocedure\sit\scalled,\sand\sso\son);\n\nPossibly\sit\sis\sthe\suse\sof\s"top-most"\sthat\sconfuses\sthe\sissue\s(does\sthe\sstack\sgrow\stop\sto\sbottom\sor\sbottom\sto\stop?),\sso\smaybe\sit\swould\sbe\sa\sgood\sidea\sto\sreplace\sthis\sterm\sby\s"outermost".\n\nAn\salternative\swording\sis:\n\n\s\sIf\snumber\sis\spositive\sthen\sit\sselects\sa\sparticular\s\n\s\sstack\slevel\s(1\srefers\sto\sthe\soutermost\sactive\sprocedure,\s\n\s\s2\sto\sthe\sprocedure\sit\scalled,\sand\sso\son,\sup\sto\sthe\scurrent\s\n\s\sframe\slevel\swhich\srefers\sto\sthe\sinfo\sframe\sitself);\n\n
J foundin obsolete:\s8.5.4
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter lars_h
J subsystem 17.\sCommands\sI-L
J title info\sframe\sdocumentation\serror
J type Bug
K 2134049fffffffffffffffffffffffffffffffff
U lars_h
Z a4872720681dc76b607eb148b2594356