|
|
Darren New wrote:
> Invisible wrote:
>> I'm pretty sure I remember several occasions where if a certain
>> expression happened to return only 1 item, it tried to interpret the
>> item as a list. IOW, when the expression finds multiple matches,
>> everything works fine, but when it finds exactly 1 match it
>> malfunctions horribly. Took me ages to figure out why...
>
> You would need to either return a list, or return one item. If you want
> to return either, you need to return a list of one item. Otherwise, yes,
> if you sometimes return a list, and sometimes return one item that looks
> like a malformed list, then you're going to confuse yourself.
If was more that I was processing a list, filtering out some of its
content, and if it turned out that the result was exactly 1 element the
script behaved in a different way than it did when the filtering yielded
several elements.
But anyway, why worry? Just stop using Tcl. ;-)
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
|