Artifact
8746d191af508a1099c9e76305b9adbca96ccbf7:
Ticket change
[8746d191af]
- New ticket
[1768830fffffffff|1768830fff] <i>Documentation of "upvar" command</i>.
by
nobody on
2007-08-06 21:26:48.
D 2007-08-06T21:26:48
J assignee msofer
J cmimetype text/plain
J comment The\sfollowing\sis\staken\sfrom\sthe\sonline\sdescription\sof\sthe\s"upvar"\scommand\swhich\swas\sgenerated\sfrom\sTcl\sCVS\sHEAD.\n\nSYNOPSIS\nupvar\s?level?\sotherVar\smyVar\s?otherVar\smyVar\s...?\n\nDESCRIPTION\nThe\svariable\snamed\sby\sotherVar\sneed\snot\sexist\sat\sthe\stime\sof\sthe\scall;\sit\swill\sbe\screated\sthe\sfirst\stime\smyVar\sis\sreferenced,\sjust\slike\san\sordinary\svariable.\n\n\nThe\sstatement\sthat\s"otherVar"\swill\sbe\screated\sin\scase\sof\sa\scall\sto\s"myVar"\sis\sconfusing\sand\sprobably\swrong.\nIn\scase\sof\sa\scall\sto\s"myVar"\sor\sif\sused\sthe\sfirst\stime\sand\sif\sthe\sreferenced\s"otherVar"\sdoes\snot\sexist\sa\serror\swill\sbe\sraised\sby\sthe\stcl\sinterpreter\sthat\s"myVar"\scan't\sbe\sread\sbecause\sit\sis\snot\sexisting.\sThis\sis\sbecause\s"myVar"\sreferences\sto\snothing.\n\nThe\sfollowing\sexample\swill\sillustrate\sthis\swith\sthe\ssecond\sprocedure\scall:\n\n#!/usr/bin/tclsh\n\nproc\sCallOn\s{\svariable\s}\s{\n\s\s\s\supvar\s$variable\svariableRef\n\s\s\s\sputs\s"variable=$variable"\n\s\s\s\sputs\s"variableRef=$variableRef"\n}\nset\sv\s"Test"\n\nCallOn\sv\s\s;\s#\sby\sname\nCallOn\s$v\s;\s#\sby\svalue\n
J foundin obsolete:\s8.5a7
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 07.\sVariables
J title Documentation\sof\s"upvar"\scommand
J type Bug
K 1768830fffffffffffffffffffffffffffffffff
U nobody
Z 1b97fe68298dbc0fc6b14b3b3f1d3d4a