Skip to content
Tcl Source Code Artifact [221d2d9c49]
Login

Artifact [221d2d9c49]

Artifact 221d2d9c49650be6d6ab4e72bd6add0c8289e25d:

Ticket change [221d2d9c49] - New ticket [1022151fffffffff|1022151fff] <i>&#39;array unset&#39; inconsistency ?</i>. by andreas_kupries on 2004-09-03 23:20:22.
D 2004-09-03T23:20:22
J assignee msofer
J cmimetype text/plain
J comment IMHO\sthe\sbehaviour\sof\sthe\scommand\n\s\s\s\s'array\sunset\s?pattern?'\nis\sinconsistent,\sand\sthe\sproblem\sis\sexacerbated\sby\san\nambiguous\sdescription\sin\sits\smanpage.\n\nTake\san\sarray\svariable,\sadd\ssome\selements,\sthen\sexecute\n\n(1)\s\s\s\s\sunset\sa\n(2)\s\s\s\s\sarray\sunset\sa\n(3)array\sunset\sa\s*\n\n[This\shas\sto\sbe\sdone\sindependently,\snot\sone\safter\sthe\nother]\n\nTracing\sand\schecking\sthe\sresults\sof\sthe\scommands\sshows\nthat\sthe\sscenarios\s(1)\sand\s(2)\sare\sequivalent.\sWhereas\nthe\sregular\spattern\sfor\sthis\stype\sof\scommand\sis\sto\smake\n(2)\sand\s(3)\sequivalent.\n\nHowever\swhen\sreading\sthe\sdocumentation\sfor\s'array\sunset'\nit\sseems\sto\simply\sthe\s(2)/(3)\sequivalence:\n\n\s\s\s\s\s\s\s\sUnsets\sall\sof\sthe\selements\sin\sthe\sarray\sthat\smatch\n\s\s\s\s\s\s\s\spattern(using\sthe\smatching\srules\sof\sstring\smatch).\n\s\s\s\s\s\s\s\s[...]\sIf\spattern\sis\somitted\sand\sarrayName\sis\san\narray\n\s\s\s\s\s\s\s\svariable,\sthen\sthe\scommand\sunsets\sthe\sentire\sarray.\n\nBecause\sof\sthe\sfirst\ssentence\sit\scan\sbe\sassumed\swhile\nreading\sthe\slast\ssentence\sthat\s'unsetting\sthe\sentire\sarray'\nmeans\sthe\sremoval\sof\sall\selements\sin\sthe\sarray,\sand\snot\nthe\sremoval\sof\sthe\svariable.\n\nOnly\sthen\sreading\sthem\sdisconnected\sit\sbecomes\sclear\nthat\sthe\slast\ssentence\smeans\sthat\sthe\svariable\sis\sunset,\nnot\sits\selements.\n\nEither\sdocumentation\sor\sbehaviour\sshould\sbe\sfixed.\nPreferably\sboth.\n
J foundin obsolete:\s8.4.7
J priority 5\sMedium
J resolution None
J status Open
J submitter andreas_kupries
J subsystem 07.\sVariables
J title 'array\sunset'\sinconsistency\s?
J type Bug
K 1022151fffffffffffffffffffffffffffffffff
U andreas_kupries
Z 360a8072692e71ee5c018956cd285cb8