Artifacts Associated With Ticket 1022151
Ticket change [221d2d9c49] (rid 130695) by andreas_kupries on 2004-09-03 23:20:22:
- assignee initialized to: "msofer"
- cmimetype initialized to: "text/plain"
- comment initialized to:
IMHO the behaviour of the command 'array unset ?pattern?' is inconsistent, and the problem is exacerbated by an ambiguous description in its manpage. Take an array variable, add some elements, then execute (1) unset a (2) array unset a (3)array unset a * [This has to be done independently, not one after the other] Tracing and checking the results of the commands shows that the scenarios (1) and (2) are equivalent. Whereas the regular pattern for this type of command is to make (2) and (3) equivalent. However when reading the documentation for 'array unset' it seems to imply the (2)/(3) equivalence: Unsets all of the elements in the array that match pattern(using the matching rules of string match). [...] If pattern is omitted and arrayName is an array variable, then the command unsets the entire array. Because of the first sentence it can be assumed while reading the last sentence that 'unsetting the entire array' means the removal of all elements in the array, and not the removal of the variable. Only then reading them disconnected it becomes clear that the last sentence means that the variable is unset, not its elements. Either documentation or behaviour should be fixed. Preferably both. - foundin initialized to: "obsolete: 8.4.7"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "andreas_kupries"
- subsystem initialized to: "07. Variables"
- title initialized to: "'array unset' inconsistency ?"
- type initialized to: "Bug"
Ticket change [646e21565f] (rid 92769) by dkf on 2004-09-06 18:03:07:
- icomment:
Logged In: YES user_id=79902 IMO the behaviour is inconsistent with the way the rest of the core operates (in terms of filtering) and so is *wrong*. I think we should fix the code and make sure that the documentation says what it should as well. Note that this may be a POTENTIAL INCOMPATABILITY, but it is at least following the Principle of Least Surprise...
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [802d25fb92] (rid 97689) by hobbs on 2004-09-08 05:44:44:
- icomment:
Logged In: YES user_id=72656 fix the docs, as the behavior is correct as originally designed.
- login: "hobbs"
- mimetype: "text/plain"
- username: "hobbs"
- icomment:
Ticket change [a345a57c3f] (rid 110023) by hobbs on 2004-09-08 06:01:46:
- icomment:
Logged In: YES user_id=72656 To clarify further, (3) allows the array to remain, while (2) will make it go away - but only if it is an array. These are noops for non-array vars, as specified in the docs, which is why these key diffs are important: Unsets all of the elements in the array that match \fIpattern\fR (using the matching rules of \fBstring match\fR). If \fIarrayName\fR isn't the name of an array variable or there are no matching elements in the array, no error will be raised. If \fIpattern\fR is omitted and \fIarrayName\fR is an array variable, then the command unsets the entire array. The command always returns an empty string.
- login: "hobbs"
- mimetype: "text/plain"
- username: "hobbs"
- icomment:
Ticket change [b53b1734f2] (rid 125206) by msofer on 2006-10-01 02:32:11:
- closedate changed to: "2006-09-30T19:32:11"
- closer changed to: "msofer"
- resolution changed to: "Invalid"
- status changed to: "Pending"
Ticket change [cb16549f50] (rid 95464) by sf-robot on 2006-10-15 09:20:08:
- closedate changed to: "2006-10-15T02:20:08"
- closer changed to: "sf-robot"
- icomment:
Logged In: YES user_id=1312539 This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker).
- login: "sf-robot"
- mimetype: "text/plain"
- status changed to: "Closed"
- username: "sf-robot"