Error processing request

Parameters

CONTENT_LENGTH0
REQUEST_METHODGET
REQUEST_URI/revision/variable?V=25
QUERY_STRINGV=25
CONTENT_TYPE
DOCUMENT_URI/revision/variable
DOCUMENT_ROOT/var/www/nikit/nikit/nginx/../docroot
SCGI1
SERVER_PROTOCOLHTTP/1.1
HTTPSon
REMOTE_ADDR172.71.255.29
REMOTE_PORT19878
SERVER_PORT4443
SERVER_NAMEwiki.tcl-lang.org
HTTP_HOSTwiki.tcl-lang.org
HTTP_CONNECTIONKeep-Alive
HTTP_ACCEPT_ENCODINGgzip, br
HTTP_X_FORWARDED_FOR3.149.233.72
HTTP_CF_RAY8768207bba4d2327-ORD
HTTP_X_FORWARDED_PROTOhttps
HTTP_CF_VISITOR{"scheme":"https"}
HTTP_ACCEPT*/*
HTTP_USER_AGENTclaudebot
HTTP_CF_CONNECTING_IP3.149.233.72
HTTP_CDN_LOOPcloudflare
HTTP_CF_IPCOUNTRYUS

Body


Error

Unknow state transition: LINE -> END

-code

1

-level

0

-errorstack

INNER {returnImm {Unknow state transition: LINE -> END} {}} CALL {my render_wikit variable '''\[http://www.tcl.tk/man/tcl/TclCmd/variable.htm%|%variable\]''',\ a\ \[Tcl\ Commands%|%built-in\]\ \[Tcl\]\ \[command\]\ since\ \[Changes\ in\ Tcl/Tk\ 8.0%|%8.0\],\ creates\ and\ optionally\ \[set%|%sets\]\nCommands%|%built-in\]\ \[Tcl\]\ \[command\],\ declares\ variables\ in\ a\ \[namespace\].\n\n\n\n\ \ \ \ :\ \ \ '''variable'''\ ?''name\ value...''?\ ''name''\ ?''value''?\ \ \n\n\n\n\n\ \ \ \[http://www.tcl.tk/man/tcl/TclCmd/variable.htm%|%official\ reference\]:\ \ \ \n\ \ \ \[http://www.tcl.tk/man/tcl/TclCmd/variable.htm%|%official\ reference\ documentation\]:\ \ \ \n\n\n\nCreates\ a\ variable\ named\ by\ the\ `\[namespace\ tail%|%tail\]`\ of\ ''name'',\ which\n`\[namespace\ upvar\]`,\ `upvar`,\ and\ `\[variable\]`\ overlap\ in\ functionality,\ but\nhave\ different\ design\ goals.\n======\n`variable`\ is\ normally\ used\ within\ `\[namespace\ eval\]`\ to\ create\ one\ or\ more\nvariables\ within\ a\ `\[namespace\]`:\n\nnamespace\ eval\ one\ \{\n\ \ \ \ variable\ greeting\ hello\n\}\nset\ one::greeting\ \;#->\ hello\n======\n\nA\ variable\ may\ exist\ but\ be\ unset:\nWhen\ used\ in\ a\ \[proc%|%procedure\],\ `variable`\ additionally\ makes\ the\ variable\ available\ in\ the\ procedure:\n======\nnamespace\ which\ -variable\ hello\;\ #->\ ::hello\nproc\ myproc\ \{\}\ \{\n\ \ \ \ variable\ greeting\ hello\n\ \ \ \ set\ greeting\ \;#->\ hello\n\}\nmyproc\nset\ greeting\ \;#->\ hello\n\nIn\ a\ \[proc%|%procedure\],\ `variable`\ makes\ a\ variable\ named\ ''name''\n======\nFor\ each\ ''name'',\ a\ variable\ is\ initialized\ with\ ''value''.\ The\ value\ for\ the\nlast\ variable\ is\ optional.\ \ If\ ''name''\ does\ not\ exist,\ it\ is\ created\ in\ the\nrelevant\ \[namespace\].\ \ If\ ''value''\ is\ specified,\ it\ is\ assigned\ to\ the\ newly\ncreated\ variable.\ \ If\ no\ ''value''\ is\ specified,\ the\ new\ variable\ is\ left\nundefined.\ If\ the\ variable\ already\ exists,\ it\ is\ set\ to\ ''value''\ if\ ''value''\nis\ specified,\ or\ left\ unchanged\ if\ no\ ''value''\ is\ given.\n\nNormally,\ ''name''\ is\ unqualified\ (does\ not\ include\ the\ names\ of\ any\ containing\nnamespaces),\ and\ the\ variable\ is\ created\ in\ the\ current\ namespace.\ If\ ''name''\nincludes\ any\ namespace\ qualifiers,\ the\ variable\ is\ created\ in\ the\ specified\nnamespace,\ relative\ to\ the\ current\ namespace.\n\nproc\ p1\ \{\}\ \{\nnamespace\ eval\ one\ \{\nset\ greeting\ hello\np1\ \;#->\ Priam\nnamespace\ eval\ two\ \{\n\ \ \ \ proc\ myproc\ \{\}\ \{\n\ \ \ \ \ \ \ \ variable\ ::one::greeting\n\ \ \ \ \ \ \ \ set\ two\ \;#->\ hello\n\}\nn2::p2\ \;#->\ hector\n\nTo\ access\ a\ namespace\ variable\ from\ inside\ a\ \[proc%|%procedure\],\ declare\ it\nusing\ `variable`.\ \ In\ this\ way\ `variable`\ resembles\ `\[global\]`,\ but\ `\[global\]`\nis\ restricted\ to\ variables\ in\ the\ global\ namespace.\n\n''name''\ can\ refer\ to\ an\ \[array\],\ but\ not\ to\ a\ variable\ in\ the\ array.\n''name''\ can\ refer\ to\ an\ \[array\],\ but\ not\ to\ an\ element\ within\ an\ array.\ \ When\n''name''\ refers\ to\ an\ array,\ ''value''\ must\ not\ be\ used.\ \ This\ implies\ that\neach\ array\ must\ be\ declared\ by\ a\ separate\ invocation\ of\ `\[variable\]`.\ \ After\nthe\ variable\ has\ been\ declared,\ elements\ within\ the\ array\ can\ be\ set\ using\nordinary\ `\[set\]`\ or\ `\[array\]`\ commands.\nAfter\ an\ array\ variable\ has\ been\ created,\ member\ variables\n`\[variable\]`\ can\ entirely\ replace\ `\[global\]`,\ so\ procedures\ can\ be\ put\ in\na\ namespace\ without\ need\ for\ rewriting.\ The\ drawback\ is\ that\ you\ can't\ specify\nseveral\ variables\ in\ one\ command\ without\ assigning\ values,\ so\ instead\ of\n`\[variable\]`\ provides\ all\ the\ functionality\ of\ `\[global\]`.\ \ Replacing\nglobal\ foo\ bar\ grill\n======\n\nrequires\ \nyou'd\ have\ to\ write\n======\nvariable\ foo\;\ variable\ bar\;\ variable\ grill\n======\n\n\[RS\]:\ \ But\ the\ fewer\ globals\ you\ use,\ the\ better\ anyway\ \;-)\n\[RS\]:\ \ But\ the\ less\ globals\ you\ use,\ the\ better\ anyway\ \;-)\n\n----\n\nidioms\ I\ am\ not\ familiar\ with.\ \ One\ of\ them\ is:\n\n======\nvariable\ \{\}\n======\n\nWhat\ the\ heck\ is\ that\ supposed\ to\ ''do''?\n\n\[DGP\]:\ Just\ what\ the\ docs\ say.\ \ It\ creates\ a\ local\ variable\ whose\ name\ is\ the\nempty\ string\ within\ the\ procedure\ and\ links\ it\ to\ the\ namespace\ variable\ named\n`\[\[\[namespace\ current\]\]\]::`.\ \ Note\ that\ `\[namespace\ tail\]\ \[\[namespace\ current\]\]::`\ is\ the\ \[empty\ string\].\n`\[\[\[namespace\ current\]\]\]::`.\ \ Note\ that\ `\[\[\[namespace\ tail\]\ \[\[namespace\ current\]\]::\]\]`\ is\ \{\}.\nIn\ this\ particular\ case,\ the\ variable\ named\ the\ \[empty\ string\]\ is\ an\ \[array\]\ variable,\ so\n======\nIn\ this\ particular\ case,\ the\ variable\ named\ nothing\ is\ an\ array\ variable,\ so\none\ can\ set\ and\ read\ its\ elements\ like\ so:\n\nset\ (elem1)\ 1\nset\ (elem2)\ 2\nif\ \{\$(elem1)\ >\ \$(elem2)\}\ \{\n\ \ \ \ set\ greater\ elem1\n\}\ else\ \{\n\ \ \ \ set\ greater\ elem2\n\}\nputs\ \"Greater\ is\ \$(\$greater)\"\n======\n\n\[escargo\]\ 2003-09-05:\ \ Gosh\ wow.\ \ Not\ only\ is\ \[everything\ is\ a\ string\],\ but\n''nothing\ is\ a\ string.''\ \[RS\]:\ 'Everything'\ includes\ 'nothing'...\n\n\[KJN\]:\ 2004-08-12:\ \ I\ came\ here\ looking\ for\ an\ explanation\ of\ this\ unusual\nidiom,\ and\ I'm\ pleased\ to\ find\ it!\n\nI\ had\ not\ realised\ until\ now\ that\ the\ minimum\ number\ of\ characters\ in\ a\n''name''\ is\ zero!\ (Is\ that\ mentioned\ in\ the\ manual\ anywhere?)\ \ Even\ without\n''varName''\ is\ zero!\ (Is\ that\ mentioned\ in\ the\ manual\ anywhere?)\ \ Even\ without\n\n======\nset\ \{\}\ 12\nputs\ \$\{\}\nset\ \{\}\n======\n\nThis\ code\ will\ echo\ `12`\ to\ stdout,\ and\ return\ the\ value\ `12`.\n\nThe\ \[empty\ string\]\ is\ an\ acceptable\ name\ for\ a\ \[proc\]:\nEven\ more\ unusual:\ the\ \[null\]\ string\ is\ acceptable\ as\ the\ name\ of\ a\ proc:\n======\nproc\ \{\}\ a\ \{\n\ \ \ \ puts\ \$a\n\ \ \ \ return\ \$a\n\}\n\n\{\}\ 42\n======\n\nwhich\ echoes\ `42`\ to\ \[stdout\]\ and\ \[return%|%returns\]\ `42`.\nwill\ echo\ `42`\ to\ stdout,\ and\ return\ the\ value\ `42`.\n\[RS\]:\ For\ scalar\ variables\ and\ commands\ you\ still\ have\ to\ delimit\ the\ \"nothing\"\nwith\ quotes\ or\ braces,\ but\ with\ array\ names,\ nothing\ is\ enough.\ The\ Tcl\ documentation\ says:\nwith\ quotes\ or\ braces,\ but\ with\ array\ names,\ nothing\ is\ enough.\ Man\ Tcl\ says:\n======\n\$''name''(index)\ \n======\n\n''name''\ is\ the\ name\ of\ an\ array\ variable\ and\ ''index''\ is\ the\ name\ of\ an\nelement\ within\ that\ array.\ Name\ must\ contain\ only\ letters,\ digits,\ underscores,\nand\ namespace\ separators,\ '''and\ may\ be\ an\ \[empty\ string\]'''.\ Hence\ the\nand\ namespace\ separators,\ '''and\ may\ be\ an\ empty\ string'''.\ -\ Hence\ the\n\n----\n\n\[Dossy\]\ and\ \[Helmut\ Giese\]\ were\ recently\ discussing\ `\[variable\]`\ on\nRecently\ \[Dossy\]\ and\ \[Helmut\ Giese\]\ were\ discussing\ the\ `\[variable\]`\ on\n\n======none\nSo\ you\ have\ to\ distinguish\ between\ 'creating'\ a\ variable\ and\n'defining'\ it.\ In\ your\ example\ you\ _create_\ 'foo::bar'\ but\ don't\n_define_\ it.\ Hence\ \[info\ exist\]\ doesn't\ see\ it\ -\ as\ told\ in\ the\ book.\n======\n\n======none\nAhh,\ yes.\ \ Okay,\ so\ then\ the\ docs\ and\ the\ behavior\ ARE\ consistent,\ cool.\ \ I\ndidn't\ realize\ that\ a\ variable\ could\ be\ \"created\"\ but\ not\ \"exist\"\ --\ weird.\n:-)\n======\n\n\n======\n%\ namespace\ eval\ foo\ \{\n\ \ \ \ proc\ foo\ \{\}\ \{\n\ \ \ \ \ \ \ \ variable\ myarr\n\ \ \ \ \ \ \ \ upvar\ somearr\ myarr\n\ \ \ \ \ \ \ \ parray\ myarr\n\ \ \ \ \}\n\ \ \ \ proc\ foo2\ \{\}\ \{\n\ \ \ \ \ \ \ \ variable\ myarr\n\ \ \ \ \ \ \ \ namespace\ which\ -variable\ myarr\n\ \ \ \ \}\n\ \ \ \ proc\ foo::foo3\ \{\}\ \{\n\ \ \ \ \ \ \ \ variable\ myarr\n\ \ \ \ \ \ \ \ info\ exists\ myarr\n\ \ \ \ \}\n\}\n\n%\ foo::foo\n\"myarr\"\ isn't\ an\ array\n\n%\ set\ somearr(x)\ y\ny\n\n%\ foo::foo\nmyarr(x)\ =\ y\n\n%\ foo::foo2\n::foo::myarr\n\n%\ foo::foo3\n0\n======\n\n----\n----\nCurrently\ (8.6.4),\ the\ command\n\[KPV\]\ 2003-09-13:\ My\ biggest\ problem\ with\ using\ `\[variable\]`\ instead\ of\n`\[global\]`\ is\ in\ \[debugging\].\ I\ typically\ debug\ via\ a\ console\ window\ where\ I\npaste\ in\ code\ from\ the\ procedure\ I'm\ interested\ in.\ When\ I\ define\ my\ variables\nin\ as\ globals,\ it\ just\ works\;\ but\ when\ the\ variables\ are\ buried\ in\ a\ namespace\nit\ doesn't--I\ either\ have\ to\ hand\ tweak\ the\ code\ to\ fully\ qualify\ the\ variable\nnames\ or\ `\[upvar\]`\ them\ into\ the\ global\ namespace.\n\n\n<<categories>>\ Tcl\ syntax\ help\ |\ Arts\ and\ crafts\ of\ Tcl-Tk\ programming\ |\ Command\ |\ Glossary regexp2} CALL {my render variable '''\[http://www.tcl.tk/man/tcl/TclCmd/variable.htm%|%variable\]''',\ a\ \[Tcl\ Commands%|%built-in\]\ \[Tcl\]\ \[command\]\ since\ \[Changes\ in\ Tcl/Tk\ 8.0%|%8.0\],\ creates\ and\ optionally\ \[set%|%sets\]\nCommands%|%built-in\]\ \[Tcl\]\ \[command\],\ declares\ variables\ in\ a\ \[namespace\].\n\n\n\n\ \ \ \ :\ \ \ '''variable'''\ ?''name\ value...''?\ ''name''\ ?''value''?\ \ \n\n\n\n\n\ \ \ \[http://www.tcl.tk/man/tcl/TclCmd/variable.htm%|%official\ reference\]:\ \ \ \n\ \ \ \[http://www.tcl.tk/man/tcl/TclCmd/variable.htm%|%official\ reference\ documentation\]:\ \ \ \n\n\n\nCreates\ a\ variable\ named\ by\ the\ `\[namespace\ tail%|%tail\]`\ of\ ''name'',\ which\n`\[namespace\ upvar\]`,\ `upvar`,\ and\ `\[variable\]`\ overlap\ in\ functionality,\ but\nhave\ different\ design\ goals.\n======\n`variable`\ is\ normally\ used\ within\ `\[namespace\ eval\]`\ to\ create\ one\ or\ more\nvariables\ within\ a\ `\[namespace\]`:\n\nnamespace\ eval\ one\ \{\n\ \ \ \ variable\ greeting\ hello\n\}\nset\ one::greeting\ \;#->\ hello\n======\n\nA\ variable\ may\ exist\ but\ be\ unset:\nWhen\ used\ in\ a\ \[proc%|%procedure\],\ `variable`\ additionally\ makes\ the\ variable\ available\ in\ the\ procedure:\n======\nnamespace\ which\ -variable\ hello\;\ #->\ ::hello\nproc\ myproc\ \{\}\ \{\n\ \ \ \ variable\ greeting\ hello\n\ \ \ \ set\ greeting\ \;#->\ hello\n\}\nmyproc\nset\ greeting\ \;#->\ hello\n\nIn\ a\ \[proc%|%procedure\],\ `variable`\ makes\ a\ variable\ named\ ''name''\n======\nFor\ each\ ''name'',\ a\ variable\ is\ initialized\ with\ ''value''.\ The\ value\ for\ the\nlast\ variable\ is\ optional.\ \ If\ ''name''\ does\ not\ exist,\ it\ is\ created\ in\ the\nrelevant\ \[namespace\].\ \ If\ ''value''\ is\ specified,\ it\ is\ assigned\ to\ the\ newly\ncreated\ variable.\ \ If\ no\ ''value''\ is\ specified,\ the\ new\ variable\ is\ left\nundefined.\ If\ the\ variable\ already\ exists,\ it\ is\ set\ to\ ''value''\ if\ ''value''\nis\ specified,\ or\ left\ unchanged\ if\ no\ ''value''\ is\ given.\n\nNormally,\ ''name''\ is\ unqualified\ (does\ not\ include\ the\ names\ of\ any\ containing\nnamespaces),\ and\ the\ variable\ is\ created\ in\ the\ current\ namespace.\ If\ ''name''\nincludes\ any\ namespace\ qualifiers,\ the\ variable\ is\ created\ in\ the\ specified\nnamespace,\ relative\ to\ the\ current\ namespace.\n\nproc\ p1\ \{\}\ \{\nnamespace\ eval\ one\ \{\nset\ greeting\ hello\np1\ \;#->\ Priam\nnamespace\ eval\ two\ \{\n\ \ \ \ proc\ myproc\ \{\}\ \{\n\ \ \ \ \ \ \ \ variable\ ::one::greeting\n\ \ \ \ \ \ \ \ set\ two\ \;#->\ hello\n\}\nn2::p2\ \;#->\ hector\n\nTo\ access\ a\ namespace\ variable\ from\ inside\ a\ \[proc%|%procedure\],\ declare\ it\nusing\ `variable`.\ \ In\ this\ way\ `variable`\ resembles\ `\[global\]`,\ but\ `\[global\]`\nis\ restricted\ to\ variables\ in\ the\ global\ namespace.\n\n''name''\ can\ refer\ to\ an\ \[array\],\ but\ not\ to\ a\ variable\ in\ the\ array.\n''name''\ can\ refer\ to\ an\ \[array\],\ but\ not\ to\ an\ element\ within\ an\ array.\ \ When\n''name''\ refers\ to\ an\ array,\ ''value''\ must\ not\ be\ used.\ \ This\ implies\ that\neach\ array\ must\ be\ declared\ by\ a\ separate\ invocation\ of\ `\[variable\]`.\ \ After\nthe\ variable\ has\ been\ declared,\ elements\ within\ the\ array\ can\ be\ set\ using\nordinary\ `\[set\]`\ or\ `\[array\]`\ commands.\nAfter\ an\ array\ variable\ has\ been\ created,\ member\ variables\n`\[variable\]`\ can\ entirely\ replace\ `\[global\]`,\ so\ procedures\ can\ be\ put\ in\na\ namespace\ without\ need\ for\ rewriting.\ The\ drawback\ is\ that\ you\ can't\ specify\nseveral\ variables\ in\ one\ command\ without\ assigning\ values,\ so\ instead\ of\n`\[variable\]`\ provides\ all\ the\ functionality\ of\ `\[global\]`.\ \ Replacing\nglobal\ foo\ bar\ grill\n======\n\nrequires\ \nyou'd\ have\ to\ write\n======\nvariable\ foo\;\ variable\ bar\;\ variable\ grill\n======\n\n\[RS\]:\ \ But\ the\ fewer\ globals\ you\ use,\ the\ better\ anyway\ \;-)\n\[RS\]:\ \ But\ the\ less\ globals\ you\ use,\ the\ better\ anyway\ \;-)\n\n----\n\nidioms\ I\ am\ not\ familiar\ with.\ \ One\ of\ them\ is:\n\n======\nvariable\ \{\}\n======\n\nWhat\ the\ heck\ is\ that\ supposed\ to\ ''do''?\n\n\[DGP\]:\ Just\ what\ the\ docs\ say.\ \ It\ creates\ a\ local\ variable\ whose\ name\ is\ the\nempty\ string\ within\ the\ procedure\ and\ links\ it\ to\ the\ namespace\ variable\ named\n`\[\[\[namespace\ current\]\]\]::`.\ \ Note\ that\ `\[namespace\ tail\]\ \[\[namespace\ current\]\]::`\ is\ the\ \[empty\ string\].\n`\[\[\[namespace\ current\]\]\]::`.\ \ Note\ that\ `\[\[\[namespace\ tail\]\ \[\[namespace\ current\]\]::\]\]`\ is\ \{\}.\nIn\ this\ particular\ case,\ the\ variable\ named\ the\ \[empty\ string\]\ is\ an\ \[array\]\ variable,\ so\n======\nIn\ this\ particular\ case,\ the\ variable\ named\ nothing\ is\ an\ array\ variable,\ so\none\ can\ set\ and\ read\ its\ elements\ like\ so:\n\nset\ (elem1)\ 1\nset\ (elem2)\ 2\nif\ \{\$(elem1)\ >\ \$(elem2)\}\ \{\n\ \ \ \ set\ greater\ elem1\n\}\ else\ \{\n\ \ \ \ set\ greater\ elem2\n\}\nputs\ \"Greater\ is\ \$(\$greater)\"\n======\n\n\[escargo\]\ 2003-09-05:\ \ Gosh\ wow.\ \ Not\ only\ is\ \[everything\ is\ a\ string\],\ but\n''nothing\ is\ a\ string.''\ \[RS\]:\ 'Everything'\ includes\ 'nothing'...\n\n\[KJN\]:\ 2004-08-12:\ \ I\ came\ here\ looking\ for\ an\ explanation\ of\ this\ unusual\nidiom,\ and\ I'm\ pleased\ to\ find\ it!\n\nI\ had\ not\ realised\ until\ now\ that\ the\ minimum\ number\ of\ characters\ in\ a\n''name''\ is\ zero!\ (Is\ that\ mentioned\ in\ the\ manual\ anywhere?)\ \ Even\ without\n''varName''\ is\ zero!\ (Is\ that\ mentioned\ in\ the\ manual\ anywhere?)\ \ Even\ without\n\n======\nset\ \{\}\ 12\nputs\ \$\{\}\nset\ \{\}\n======\n\nThis\ code\ will\ echo\ `12`\ to\ stdout,\ and\ return\ the\ value\ `12`.\n\nThe\ \[empty\ string\]\ is\ an\ acceptable\ name\ for\ a\ \[proc\]:\nEven\ more\ unusual:\ the\ \[null\]\ string\ is\ acceptable\ as\ the\ name\ of\ a\ proc:\n======\nproc\ \{\}\ a\ \{\n\ \ \ \ puts\ \$a\n\ \ \ \ return\ \$a\n\}\n\n\{\}\ 42\n======\n\nwhich\ echoes\ `42`\ to\ \[stdout\]\ and\ \[return%|%returns\]\ `42`.\nwill\ echo\ `42`\ to\ stdout,\ and\ return\ the\ value\ `42`.\n\[RS\]:\ For\ scalar\ variables\ and\ commands\ you\ still\ have\ to\ delimit\ the\ \"nothing\"\nwith\ quotes\ or\ braces,\ but\ with\ array\ names,\ nothing\ is\ enough.\ The\ Tcl\ documentation\ says:\nwith\ quotes\ or\ braces,\ but\ with\ array\ names,\ nothing\ is\ enough.\ Man\ Tcl\ says:\n======\n\$''name''(index)\ \n======\n\n''name''\ is\ the\ name\ of\ an\ array\ variable\ and\ ''index''\ is\ the\ name\ of\ an\nelement\ within\ that\ array.\ Name\ must\ contain\ only\ letters,\ digits,\ underscores,\nand\ namespace\ separators,\ '''and\ may\ be\ an\ \[empty\ string\]'''.\ Hence\ the\nand\ namespace\ separators,\ '''and\ may\ be\ an\ empty\ string'''.\ -\ Hence\ the\n\n----\n\n\[Dossy\]\ and\ \[Helmut\ Giese\]\ were\ recently\ discussing\ `\[variable\]`\ on\nRecently\ \[Dossy\]\ and\ \[Helmut\ Giese\]\ were\ discussing\ the\ `\[variable\]`\ on\n\n======none\nSo\ you\ have\ to\ distinguish\ between\ 'creating'\ a\ variable\ and\n'defining'\ it.\ In\ your\ example\ you\ _create_\ 'foo::bar'\ but\ don't\n_define_\ it.\ Hence\ \[info\ exist\]\ doesn't\ see\ it\ -\ as\ told\ in\ the\ book.\n======\n\n======none\nAhh,\ yes.\ \ Okay,\ so\ then\ the\ docs\ and\ the\ behavior\ ARE\ consistent,\ cool.\ \ I\ndidn't\ realize\ that\ a\ variable\ could\ be\ \"created\"\ but\ not\ \"exist\"\ --\ weird.\n:-)\n======\n\n\n======\n%\ namespace\ eval\ foo\ \{\n\ \ \ \ proc\ foo\ \{\}\ \{\n\ \ \ \ \ \ \ \ variable\ myarr\n\ \ \ \ \ \ \ \ upvar\ somearr\ myarr\n\ \ \ \ \ \ \ \ parray\ myarr\n\ \ \ \ \}\n\ \ \ \ proc\ foo2\ \{\}\ \{\n\ \ \ \ \ \ \ \ variable\ myarr\n\ \ \ \ \ \ \ \ namespace\ which\ -variable\ myarr\n\ \ \ \ \}\n\ \ \ \ proc\ foo::foo3\ \{\}\ \{\n\ \ \ \ \ \ \ \ variable\ myarr\n\ \ \ \ \ \ \ \ info\ exists\ myarr\n\ \ \ \ \}\n\}\n\n%\ foo::foo\n\"myarr\"\ isn't\ an\ array\n\n%\ set\ somearr(x)\ y\ny\n\n%\ foo::foo\nmyarr(x)\ =\ y\n\n%\ foo::foo2\n::foo::myarr\n\n%\ foo::foo3\n0\n======\n\n----\n----\nCurrently\ (8.6.4),\ the\ command\n\[KPV\]\ 2003-09-13:\ My\ biggest\ problem\ with\ using\ `\[variable\]`\ instead\ of\n`\[global\]`\ is\ in\ \[debugging\].\ I\ typically\ debug\ via\ a\ console\ window\ where\ I\npaste\ in\ code\ from\ the\ procedure\ I'm\ interested\ in.\ When\ I\ define\ my\ variables\nin\ as\ globals,\ it\ just\ works\;\ but\ when\ the\ variables\ are\ buried\ in\ a\ namespace\nit\ doesn't--I\ either\ have\ to\ hand\ tweak\ the\ code\ to\ fully\ qualify\ the\ variable\nnames\ or\ `\[upvar\]`\ them\ into\ the\ global\ namespace.\n\n\n<<categories>>\ Tcl\ syntax\ help\ |\ Arts\ and\ crafts\ of\ Tcl-Tk\ programming\ |\ Command\ |\ Glossary} CALL {my revision variable} CALL {::oo::Obj3498521 process revision/variable} CALL {::oo::Obj3498519 process}

-errorcode

NONE

-errorinfo

Unknow state transition: LINE -> END
    while executing
"error $msg"
    (class "::Wiki" method "render_wikit" line 6)
    invoked from within
"my render_$default_markup $N $C $mkup_rendering_engine"
    (class "::Wiki" method "render" line 8)
    invoked from within
"my render $name $C"
    (class "::Wiki" method "revision" line 31)
    invoked from within
"my revision $page"
    (class "::Wiki" method "process" line 56)
    invoked from within
"$server process [string trim $uri /]"

-errorline

4