Error processing request

Parameters

CONTENT_LENGTH0
REQUEST_METHODGET
REQUEST_URI/revision/lindex?V=23
QUERY_STRINGV=23
CONTENT_TYPE
DOCUMENT_URI/revision/lindex
DOCUMENT_ROOT/var/www/nikit/nikit/nginx/../docroot
SCGI1
SERVER_PROTOCOLHTTP/1.1
HTTPSon
REMOTE_ADDR172.70.126.236
REMOTE_PORT11388
SERVER_PORT4443
SERVER_NAMEwiki.tcl-lang.org
HTTP_HOSTwiki.tcl-lang.org
HTTP_CONNECTIONKeep-Alive
HTTP_ACCEPT_ENCODINGgzip, br
HTTP_X_FORWARDED_FOR3.149.213.209
HTTP_CF_RAY87f0b8bcad10e178-ORD
HTTP_X_FORWARDED_PROTOhttps
HTTP_CF_VISITOR{"scheme":"https"}
HTTP_ACCEPT*/*
HTTP_USER_AGENTMozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; [email protected])
HTTP_CF_CONNECTING_IP3.149.213.209
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 lindex '''\[http://www.tcl.tk/man/tcl/TclCmd/lindex.htm%|%lindex\]''',\ a\ \[Tcl\ Commands%|%built-in\]\ Tcl\ command,\ retrieves\ an\ \[element\]\ from\ a\ `\[list\]`\ or\ a\ nested\nCommands%|%built-in\]\ Tcl\ command,\ retrieves\ an\ item\ from\ a\ \[list\]\ or\ a\ nested\n\n\n\n**\ See\ Also\ **\n\n\ \ \ \[list\]:\ \ \ \n\ \ \ \n\ \ \ \[Trees\ as\ nested\ lists\]:\ \ \ \n\ \ \ \[lappend\]:\ \ \ \n\n\ \ \ \[linsert\]:\ \ \ \n\n\ \ \ \[llength\]:\ \ \ \n\n\ \ \ \[lrange\]:\ \ \ \n\n\ \ \ \[lreplace\]:\ \ \ \n\n\ \ \ \[lsearch\]:\ \ \ \n\n\ \ \ \[lsort\]:\ \ \ \n\n\n\ \ \ \[lindex\ forward\ compatibility\]:\ \ \ \n\n\ \ \ \[identity\ function\]:\ \ \ one\ use\ for\ `lindex`\n\n\n\n\ \ \ \[http://www.tcl.tk/man/tcl/TclCmd/lindex.htm%|%official\ reference\]:\ \ \ \n\n\ \ \ \[TIP\]\ \[http://www.tcl.tk/cgi-bin/tct/tip/22.html%|%22\]:\ Multiple\ Arguments\ to\ `lindex`:\ \ \ \n\ \ \ \[TIP\]\ \[http://www.tcl.tk/cgi-bin/tct/tip/45.html%|%45\]:\ Empty\ index\ lists\ for\ `lindex`\ and\ `\[lset\]`:\ \ \ \n\n\n\ \ \ \ :\ \ \ '''lindex'''\ ''list''\ ?''index\ ...''?\n\ \ \ \ :\ \ \ '''lindex'''\ ''list\ index''\ ?''index\ ...''?\n\n\n\n**\ Description\ **\n\nReturns\ the\ ''index'''th\ element\ from\ ''list'',\ where\ the\ first\ element\ in\nReturns\ the\ ''index'''th\ \[element\]\ from\ ''list'',\ where\ the\ first\ element\ in\nthe\ number\ of\ elements\ in\ list,\ an\ empty\ string\ is\ returned.\ If\ there\ is\ no\ ''index''\ argument,\ ''list''\ is\ returned\ even\ if\ it\ is\ not\ a\ well-formed\ list.\nthe\ number\ of\ elements\ in\ list,\ an\ empty\ string\ is\ returned.\n''index''\ can\ be\ any\ of\ the\ forms\ described\ for\ `\[string\]`\ indices.\n''index''\ can\ be\ any\ of\ the\ forms\ described\ for\ \[\[`\[string\]`\]\ indices.\nWhere\ multiple\ ''index''\ arguments\ are\ given,\ they\ specify\ a\ path\ to\ an\ element\nWhere\ multiple\ ''index''\ arguments\ are\ given,\ they\ specify\ a\ path\ to\ an\ element\nin\ a\ nested\ list.\n======\nspecify\ a\ path\ to\ a\ element\ in\ a\ nested\ list.\ \ Thus,\ these\ three\ are\ equivalent:\nspecify\ a\ path\ to\ an\ item\ in\ a\ nested\ list.\ \ Thus,\ these\ three\ are\ equivalent:\n======\nlindex\ \$nestedList\ 1\ 2\ 3\nlindex\ \$nestedList\ \{1\ 2\ 3\}\nlindex\ \[lindex\ \[lindex\ \$nestedList\ 1\]\ 2\]\ 3\n======\n\nWithout\ any\ indices,\ or\ with\ an\ empty\ ''indexList'',\ the\ contents\ of\ the\n''list''\ argument\ are\ returned\ without\ further\ interpretation,\ meaning\ that\ in\nthis\ case,\ ''list''\ isn't\ even\ checked\ to\ make\ sure\ it\ is\ a\ properly\ formatted\nlist.\ \ Therefore,\ any\ value\ at\ all\ is\ valid.\ \ This\ can\ be\ useful\ when\ a\nfunction\ that\ simply\ returns\ its\ argument\ is\ needed.\n\n\n\n**\ Discussion\ **\n**\ Disussion\ **\n\[LES\]\ 2005-08-15:\ \ What\ does\ `lindex`\ do\ that\ `\[lrange\]`\ doesn't?\nThe\ announcement\ of\ the\ nested\ list\ functionality\ was\ documented\ here\ as\ follows:\n\nAlso\ note\ that\ recent\ http://purl.org/tcl/tip/\ TIPs\ 22\ and\ 45\ have\ been\nimplemented\ and\ comitted\ to\ Tcl\ 8.4\ source\ CVS\ tree.\ \ Here\ is\ a\ summary\ of\ the\nnew\ functionality\ from\ \[Kevin\ Kenny\]:\n\n======none\nJeff\ Hobbs\ today\ committed\ to\ the\ CVS\ HEAD\ at\ Sourceforge\ the\ changes\ndescribed\ in\ TIP's\ 22\ (Multiple\ Index\ Arguments\ to\ lindex),\ 33\ (Add\ 'lset'\nCommand\ to\ Assign\ to\ List\ Elements),\ and\ 45\ (Empty\ index\ lists\ for\ \[\[lindex\]\nand\ \[lset\])\n\nThese\ changes\ augment\ the\ \[\[lindex\]\ command\ so\ that\ it\ can\ extract\ elements\nfrom\ sublists,\ for\ example:\n\n\ \ \ \ \[lindex\ \{\{a\ b\ c\}\ \{d\ e\ f\}\ \{g\ h\ i\}\}\ 1\ 1\]\ =>\ e\n\nThey\ also\ implement\ an\ \[\[lset\]\ command\ that\ may\ be\ used\ to\ change\ individual\nelements\ within\ lists\ and\ sublists.\ \ Taken\ together,\ these\ commands\ can\ be\nused\ to\ treat\ lists\ as\ if\ they\ were\ linear\ arrays.\ \ For\ instance,\ the\nfollowing\ procedure\ might\ be\ used\ to\ reverse\ the\ order\ of\ elements\ in\ a\nlist.\n\n\ \ \ \ proc\ reverse\ \{\ list\ \}\ \{\n\ \ \ \ \ \ \ \ set\ i\ 0\n\ \ \ \ \ \ \ \ set\ j\ \[expr\ \{\ \[llength\ \$list\]\ -\ 1\ \}\]\n\ \ \ \ \ \ \ \ while\ \{\ \$j\ >\ \$i\ \}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ temp\ \[lindex\ \$list\ \$i\]\n\ \ \ \ \ \ \ \ \ \ \ \ lset\ list\ \$i\ \[lindex\ \$list\ \$j\]\n\ \ \ \ \ \ \ \ \ \ \ \ lset\ list\ \$j\ \$temp\n\ \ \ \ \ \ \ \ \ \ \ \ incr\ i\n\ \ \ \ \ \ \ \ \ \ \ \ incr\ j\ -1\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ return\ \$list\n\ \ \ \ \}\n\nUpdated\ documentation\ for\ the\ commands\ is\ available\ in\ the\ 'doc/'\ \nsubdirectory\ in\ the\ source\ tree.\ \ The\ original\ proposals\ may\ be\ found\ at\n\n\ \ \ \ http://www.purl.org/tcl/tip/22.htm\ \n\ \ \ \ http://www.purl.org/tcl/tip/33.htm\ \n\ \ \ \ http://www.purl.org/tcl/tip/45.htm\n\n\n--\ \n73\ de\ \[ke9tv\]/2,\ Kevin\ KENNY\ \ \ \ \ \ GE\ Corporate\ R&D,\ Niskayuna,\ New\ York,\ USA\n\n======\n\n\[LES\]\ 2005-08-15:\ \ What\ does\ \[\[`lindex`\]\ do\ that\ \[\[`\[lrange\]`\]\ doesn't?\n\[pmaage\]\ take\ less\ time\ \[schlenk\]\ direct\ access\ to\ elements\ in\ nested\ lists.\ \ \n\[LES\]\ Look,\ Ma!\ No\ lindex!\n\n======\nproc\ picknested\ \{argList\ \ args\}\ \{\nproc\ picknested\ \{\ argList\ \ args\ \}\ \{\n\ \ \ for\ \ \{set\ _depth\ 0\}\ \ \{\$_depth\ <\ \[llength\ \$args\]\}\ \ \{incr\ _depth\}\ \ \{\n\ \ \ \ \ \ \ set\ argList\ \{*\}\[lrange\ \$argList\ \$_range\ \$_range\]\n\ \ \ \ \ \ \ set\ argList\ \{expand\}\[lrange\ \$argList\ \$_range\ \$_range\]\n\ \ \ return\ \$argList\n\}\n======\n\nTesting:\n\n======none\n%\ picknested\ \{\{a\ b\ c\}\ \{d\ e\ \{foo\ bar\ hey\}\ f\}\ \{g\ h\ i\}\}\ \ 0\na\ b\ c\n\n%\ picknested\ \{\{a\ b\ c\}\ \{d\ e\ \{foo\ bar\ hey\}\ f\}\ \{g\ h\ i\}\}\ \ 0\ 1\nb\n\n%\ picknested\ \{\{a\ b\ c\}\ \{d\ e\ \{foo\ bar\ hey\}\ f\}\ \{g\ h\ i\}\}\ \ 1\ 2\nfoo\ bar\ hey\n\n%\ picknested\ \{\{a\ b\ c\}\ \{d\ e\ \{foo\ bar\ hey\}\ f\}\ \{g\ h\ i\}\}\ \ 1\ 2\ 0\nfoo\n\n%\ picknested\ \{\{a\ b\ c\}\ \{d\ e\ \{foo\ bar\ hey\}\ f\}\ \{g\ h\ i\}\}\ \ 1\ 2\ 2\nhey\n======\n\n\[schlenk\]:\ Should\ have\ said\ 'easy'\ access.\ You\ can\ do\ the\ same\ with\n\[schlenk\]\ Should\ have\ said\ 'easy'\ access.\ You\ can\ do\ the\ same\ with\ lrange,\ yes.\nYou\ do\ not\ need\ all\ list\ commands,\ most\ can\ be\ replaced\ by\ a\ proc\ (think\nlsearch,\ lsort,\ lreplace,\ linsert,\ lindex).\ Its\ just\ a\ tradeoff\ how\ many\ list\ncommands\ exist.\ (see\ \[struct::list\]\ for\ some\ more).\ Having\ more\ or\ fewer\ncommands\ is\ mostly\ an\ optimization\ in\ time\ or\ space.\ \ \ \n\[Lars\ H\]:\ I'd\ go\ further\ and\ say\ `\[lrange\]`\ still\ doesn't\ give\ you\ access\ to\n\[Lars\ H\]:\ I'd\ go\ further\ and\ say\ \[lrange\]\ still\ doesn't\ give\ you\ access\ to\ the\ nested\ elements--it's\ really\ \[\{expand\}\]\ (and\ in\ the\ case\ of\ the\ indices\ shimmering)\ that\ you\ rely\ on\ to\ pick\ out\ elements\ of\ lists\ (undo\ whatever\ list-quoting\ were\ applied\ to\ them).\ But\ why\ bother\ with\ \[lrange\],\ when\ it's\ all\ much\ simpler\ with\ \[foreach\]?\n======\nproc\ picknested2\ \{L\ args\}\ \{\n\ \ \ \ foreach\ index\ \$args\ \{\n\ \ \ \ \ \ \ \ if\ \{\$index\ <\ 0\}\ then\ \{return\ \{\}\}\n\ \ \ \ \ \ \ \ foreach\ L\ \$L\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\[incr\ index\ -1\]\ <\ 0\}\ then\ \{break\}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\[incr\ index\ -1\]<0\}\ then\ \{break\}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\ \ \ \ return\ \$L\n\}\n======\n\nRemove\ the\ first\ and\ last\ `\[if\]`\ if\ you\ don't\ worry\ about\ correct\ behaviour\nRemove\ the\ first\ and\ last\ \[\[`\[if\]`\]\ if\ you\ don't\ worry\ about\ correct\ behaviour\n\n\[AMG\],\ perhaps\ echoing\ \[Lars\ H\]:\ `\[lrange\]`\ can't\ directly\ be\ used\ to\ obtain\ a\ single\ element\ from\ a\ list.\ \ The\ closest\ it\ comes\ is\ to\ return\ a\ ''list''\ whose\ sole\ element\ is\ the\ one\ you're\ looking\ for.\ \ The\ difference\ is\ the\ same\ as\ that\ between\ a\ value\ and\ a\ single-element\ list\ containing\ that\ value.\ \ For\ many\ values,\ there\ is\ no\ script-visible\ difference\ (unless\ you're\ measuring\ performance,\ see\ \[shimmering\]).\ \ But\ you\ cannot\ rely\ on\ this\ in\ general.\ \ Here's\ an\ example:\n regexp2} CALL {my render lindex '''\[http://www.tcl.tk/man/tcl/TclCmd/lindex.htm%|%lindex\]''',\ a\ \[Tcl\ Commands%|%built-in\]\ Tcl\ command,\ retrieves\ an\ \[element\]\ from\ a\ `\[list\]`\ or\ a\ nested\nCommands%|%built-in\]\ Tcl\ command,\ retrieves\ an\ item\ from\ a\ \[list\]\ or\ a\ nested\n\n\n\n**\ See\ Also\ **\n\n\ \ \ \[list\]:\ \ \ \n\ \ \ \n\ \ \ \[Trees\ as\ nested\ lists\]:\ \ \ \n\ \ \ \[lappend\]:\ \ \ \n\n\ \ \ \[linsert\]:\ \ \ \n\n\ \ \ \[llength\]:\ \ \ \n\n\ \ \ \[lrange\]:\ \ \ \n\n\ \ \ \[lreplace\]:\ \ \ \n\n\ \ \ \[lsearch\]:\ \ \ \n\n\ \ \ \[lsort\]:\ \ \ \n\n\n\ \ \ \[lindex\ forward\ compatibility\]:\ \ \ \n\n\ \ \ \[identity\ function\]:\ \ \ one\ use\ for\ `lindex`\n\n\n\n\ \ \ \[http://www.tcl.tk/man/tcl/TclCmd/lindex.htm%|%official\ reference\]:\ \ \ \n\n\ \ \ \[TIP\]\ \[http://www.tcl.tk/cgi-bin/tct/tip/22.html%|%22\]:\ Multiple\ Arguments\ to\ `lindex`:\ \ \ \n\ \ \ \[TIP\]\ \[http://www.tcl.tk/cgi-bin/tct/tip/45.html%|%45\]:\ Empty\ index\ lists\ for\ `lindex`\ and\ `\[lset\]`:\ \ \ \n\n\n\ \ \ \ :\ \ \ '''lindex'''\ ''list''\ ?''index\ ...''?\n\ \ \ \ :\ \ \ '''lindex'''\ ''list\ index''\ ?''index\ ...''?\n\n\n\n**\ Description\ **\n\nReturns\ the\ ''index'''th\ element\ from\ ''list'',\ where\ the\ first\ element\ in\nReturns\ the\ ''index'''th\ \[element\]\ from\ ''list'',\ where\ the\ first\ element\ in\nthe\ number\ of\ elements\ in\ list,\ an\ empty\ string\ is\ returned.\ If\ there\ is\ no\ ''index''\ argument,\ ''list''\ is\ returned\ even\ if\ it\ is\ not\ a\ well-formed\ list.\nthe\ number\ of\ elements\ in\ list,\ an\ empty\ string\ is\ returned.\n''index''\ can\ be\ any\ of\ the\ forms\ described\ for\ `\[string\]`\ indices.\n''index''\ can\ be\ any\ of\ the\ forms\ described\ for\ \[\[`\[string\]`\]\ indices.\nWhere\ multiple\ ''index''\ arguments\ are\ given,\ they\ specify\ a\ path\ to\ an\ element\nWhere\ multiple\ ''index''\ arguments\ are\ given,\ they\ specify\ a\ path\ to\ an\ element\nin\ a\ nested\ list.\n======\nspecify\ a\ path\ to\ a\ element\ in\ a\ nested\ list.\ \ Thus,\ these\ three\ are\ equivalent:\nspecify\ a\ path\ to\ an\ item\ in\ a\ nested\ list.\ \ Thus,\ these\ three\ are\ equivalent:\n======\nlindex\ \$nestedList\ 1\ 2\ 3\nlindex\ \$nestedList\ \{1\ 2\ 3\}\nlindex\ \[lindex\ \[lindex\ \$nestedList\ 1\]\ 2\]\ 3\n======\n\nWithout\ any\ indices,\ or\ with\ an\ empty\ ''indexList'',\ the\ contents\ of\ the\n''list''\ argument\ are\ returned\ without\ further\ interpretation,\ meaning\ that\ in\nthis\ case,\ ''list''\ isn't\ even\ checked\ to\ make\ sure\ it\ is\ a\ properly\ formatted\nlist.\ \ Therefore,\ any\ value\ at\ all\ is\ valid.\ \ This\ can\ be\ useful\ when\ a\nfunction\ that\ simply\ returns\ its\ argument\ is\ needed.\n\n\n\n**\ Discussion\ **\n**\ Disussion\ **\n\[LES\]\ 2005-08-15:\ \ What\ does\ `lindex`\ do\ that\ `\[lrange\]`\ doesn't?\nThe\ announcement\ of\ the\ nested\ list\ functionality\ was\ documented\ here\ as\ follows:\n\nAlso\ note\ that\ recent\ http://purl.org/tcl/tip/\ TIPs\ 22\ and\ 45\ have\ been\nimplemented\ and\ comitted\ to\ Tcl\ 8.4\ source\ CVS\ tree.\ \ Here\ is\ a\ summary\ of\ the\nnew\ functionality\ from\ \[Kevin\ Kenny\]:\n\n======none\nJeff\ Hobbs\ today\ committed\ to\ the\ CVS\ HEAD\ at\ Sourceforge\ the\ changes\ndescribed\ in\ TIP's\ 22\ (Multiple\ Index\ Arguments\ to\ lindex),\ 33\ (Add\ 'lset'\nCommand\ to\ Assign\ to\ List\ Elements),\ and\ 45\ (Empty\ index\ lists\ for\ \[\[lindex\]\nand\ \[lset\])\n\nThese\ changes\ augment\ the\ \[\[lindex\]\ command\ so\ that\ it\ can\ extract\ elements\nfrom\ sublists,\ for\ example:\n\n\ \ \ \ \[lindex\ \{\{a\ b\ c\}\ \{d\ e\ f\}\ \{g\ h\ i\}\}\ 1\ 1\]\ =>\ e\n\nThey\ also\ implement\ an\ \[\[lset\]\ command\ that\ may\ be\ used\ to\ change\ individual\nelements\ within\ lists\ and\ sublists.\ \ Taken\ together,\ these\ commands\ can\ be\nused\ to\ treat\ lists\ as\ if\ they\ were\ linear\ arrays.\ \ For\ instance,\ the\nfollowing\ procedure\ might\ be\ used\ to\ reverse\ the\ order\ of\ elements\ in\ a\nlist.\n\n\ \ \ \ proc\ reverse\ \{\ list\ \}\ \{\n\ \ \ \ \ \ \ \ set\ i\ 0\n\ \ \ \ \ \ \ \ set\ j\ \[expr\ \{\ \[llength\ \$list\]\ -\ 1\ \}\]\n\ \ \ \ \ \ \ \ while\ \{\ \$j\ >\ \$i\ \}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ temp\ \[lindex\ \$list\ \$i\]\n\ \ \ \ \ \ \ \ \ \ \ \ lset\ list\ \$i\ \[lindex\ \$list\ \$j\]\n\ \ \ \ \ \ \ \ \ \ \ \ lset\ list\ \$j\ \$temp\n\ \ \ \ \ \ \ \ \ \ \ \ incr\ i\n\ \ \ \ \ \ \ \ \ \ \ \ incr\ j\ -1\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ return\ \$list\n\ \ \ \ \}\n\nUpdated\ documentation\ for\ the\ commands\ is\ available\ in\ the\ 'doc/'\ \nsubdirectory\ in\ the\ source\ tree.\ \ The\ original\ proposals\ may\ be\ found\ at\n\n\ \ \ \ http://www.purl.org/tcl/tip/22.htm\ \n\ \ \ \ http://www.purl.org/tcl/tip/33.htm\ \n\ \ \ \ http://www.purl.org/tcl/tip/45.htm\n\n\n--\ \n73\ de\ \[ke9tv\]/2,\ Kevin\ KENNY\ \ \ \ \ \ GE\ Corporate\ R&D,\ Niskayuna,\ New\ York,\ USA\n\n======\n\n\[LES\]\ 2005-08-15:\ \ What\ does\ \[\[`lindex`\]\ do\ that\ \[\[`\[lrange\]`\]\ doesn't?\n\[pmaage\]\ take\ less\ time\ \[schlenk\]\ direct\ access\ to\ elements\ in\ nested\ lists.\ \ \n\[LES\]\ Look,\ Ma!\ No\ lindex!\n\n======\nproc\ picknested\ \{argList\ \ args\}\ \{\nproc\ picknested\ \{\ argList\ \ args\ \}\ \{\n\ \ \ for\ \ \{set\ _depth\ 0\}\ \ \{\$_depth\ <\ \[llength\ \$args\]\}\ \ \{incr\ _depth\}\ \ \{\n\ \ \ \ \ \ \ set\ argList\ \{*\}\[lrange\ \$argList\ \$_range\ \$_range\]\n\ \ \ \ \ \ \ set\ argList\ \{expand\}\[lrange\ \$argList\ \$_range\ \$_range\]\n\ \ \ return\ \$argList\n\}\n======\n\nTesting:\n\n======none\n%\ picknested\ \{\{a\ b\ c\}\ \{d\ e\ \{foo\ bar\ hey\}\ f\}\ \{g\ h\ i\}\}\ \ 0\na\ b\ c\n\n%\ picknested\ \{\{a\ b\ c\}\ \{d\ e\ \{foo\ bar\ hey\}\ f\}\ \{g\ h\ i\}\}\ \ 0\ 1\nb\n\n%\ picknested\ \{\{a\ b\ c\}\ \{d\ e\ \{foo\ bar\ hey\}\ f\}\ \{g\ h\ i\}\}\ \ 1\ 2\nfoo\ bar\ hey\n\n%\ picknested\ \{\{a\ b\ c\}\ \{d\ e\ \{foo\ bar\ hey\}\ f\}\ \{g\ h\ i\}\}\ \ 1\ 2\ 0\nfoo\n\n%\ picknested\ \{\{a\ b\ c\}\ \{d\ e\ \{foo\ bar\ hey\}\ f\}\ \{g\ h\ i\}\}\ \ 1\ 2\ 2\nhey\n======\n\n\[schlenk\]:\ Should\ have\ said\ 'easy'\ access.\ You\ can\ do\ the\ same\ with\n\[schlenk\]\ Should\ have\ said\ 'easy'\ access.\ You\ can\ do\ the\ same\ with\ lrange,\ yes.\nYou\ do\ not\ need\ all\ list\ commands,\ most\ can\ be\ replaced\ by\ a\ proc\ (think\nlsearch,\ lsort,\ lreplace,\ linsert,\ lindex).\ Its\ just\ a\ tradeoff\ how\ many\ list\ncommands\ exist.\ (see\ \[struct::list\]\ for\ some\ more).\ Having\ more\ or\ fewer\ncommands\ is\ mostly\ an\ optimization\ in\ time\ or\ space.\ \ \ \n\[Lars\ H\]:\ I'd\ go\ further\ and\ say\ `\[lrange\]`\ still\ doesn't\ give\ you\ access\ to\n\[Lars\ H\]:\ I'd\ go\ further\ and\ say\ \[lrange\]\ still\ doesn't\ give\ you\ access\ to\ the\ nested\ elements--it's\ really\ \[\{expand\}\]\ (and\ in\ the\ case\ of\ the\ indices\ shimmering)\ that\ you\ rely\ on\ to\ pick\ out\ elements\ of\ lists\ (undo\ whatever\ list-quoting\ were\ applied\ to\ them).\ But\ why\ bother\ with\ \[lrange\],\ when\ it's\ all\ much\ simpler\ with\ \[foreach\]?\n======\nproc\ picknested2\ \{L\ args\}\ \{\n\ \ \ \ foreach\ index\ \$args\ \{\n\ \ \ \ \ \ \ \ if\ \{\$index\ <\ 0\}\ then\ \{return\ \{\}\}\n\ \ \ \ \ \ \ \ foreach\ L\ \$L\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\[incr\ index\ -1\]\ <\ 0\}\ then\ \{break\}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\[incr\ index\ -1\]<0\}\ then\ \{break\}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\ \ \ \ return\ \$L\n\}\n======\n\nRemove\ the\ first\ and\ last\ `\[if\]`\ if\ you\ don't\ worry\ about\ correct\ behaviour\nRemove\ the\ first\ and\ last\ \[\[`\[if\]`\]\ if\ you\ don't\ worry\ about\ correct\ behaviour\n\n\[AMG\],\ perhaps\ echoing\ \[Lars\ H\]:\ `\[lrange\]`\ can't\ directly\ be\ used\ to\ obtain\ a\ single\ element\ from\ a\ list.\ \ The\ closest\ it\ comes\ is\ to\ return\ a\ ''list''\ whose\ sole\ element\ is\ the\ one\ you're\ looking\ for.\ \ The\ difference\ is\ the\ same\ as\ that\ between\ a\ value\ and\ a\ single-element\ list\ containing\ that\ value.\ \ For\ many\ values,\ there\ is\ no\ script-visible\ difference\ (unless\ you're\ measuring\ performance,\ see\ \[shimmering\]).\ \ But\ you\ cannot\ rely\ on\ this\ in\ general.\ \ Here's\ an\ example:\n} CALL {my revision lindex} CALL {::oo::Obj6136298 process revision/lindex} CALL {::oo::Obj6136296 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