From: WANGNICK S. <seb...@eu...> - 2004-09-28 16:34:25
|
Dear all, IMHO array value is not necessary. array value var elem value true can be written as array incr var elem 0 value (provided some logic in the implementation of array incr skips the attempt to add 0 to the value, which might not be numeric) array value var elem "" false can be written as array get var elem To introduce additional syntax for the strange case where one wants something peculiar to be returned, but not stored in the array, when the element doesn't exist is IMHO not justified. Regards, Sebastian -- Dipl.-Inform. Sebastian <dot> Wangnick <at eurocontrol dot int> Team Leader ENG/OPE/HMI Eurocontrol Maastricht UAC, Horsterweg 11, NL-6199AC Maastricht-Airport, +31-43-3661-370 -----Original Message----- From: tcl...@li... [mailto:tcl...@li...] On Behalf Of Reinhard Max Sent: Tuesday 28 September 2004 10:53 To: tcl...@li... Cc: Peter MacDonald Subject: Re: [TCLCORE] TIP #224: Add New [array] Subcommands 'incr' and 'value' Hi, nice TIP! On Tue, 28 Sep 2004 at 08:19, Peter MacDonald wrote: > *array incr* /var elem/ ?/value/ ?/init/?? [...] > *array value* /var elem/ ?/value/ ?/init/?? But the terms "value" and "init" are being used for different purposes in the two subcommands, which I think is calling for confusion. Even more so since the semantic of the "value" argument to [array value] is similar to the "init" argument of [array incr]. I think the "value" argument to [array incr] should be called "increment" to match the documentation of the [incr] command. Then the current "init" argument could be renamed to "value" or "initvalue". Furthermore, "initialize" might be a better name for an argument that expects a boolean value. array incr /var elem/ ?/increment/ ?/initvalue/?? array value /var elem/ ?/value/ ?/initialize/?? cu Reinhard ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php _______________________________________________ Tcl-Core mailing list Tcl...@li... https://lists.sourceforge.net/lists/listinfo/tcl-core ____ This message and any files transmitted with it are legally privileged and intended for the sole use of the individual(s) or entity to whom they are addressed. If you are not the intended recipient, please notify the sender by reply and delete the message and any attachments from your system. Any unauthorised use or disclosure of the content of this message is strictly prohibited and may be unlawful. Nothing in this e-mail message amounts to a contractual or legal commitment on the part of EUROCONTROL unless it is confirmed by appropriately signed hard copy. Any views expressed in this message are those of the sender. |