|
|
>> Tcl encodes all data types as strings. I've been bitten by this
>> before... You write a Tcl script, it works fine, and then it
>> encounters some input that happens to contain a curly-bracket or a
>> dollar sign and Weird Crap happens...
>
> Only if you don't treat your lists as lists and your strings as strings.
> Otherwise, the rules are extremely straightforward.
>
>> [I'm sure there's a way to avoid this. It's just tricky, and it makes
>> me nervous.]
>
> I never get bitten by this. The only time this happens is when you pass
> a string to something that indexes into a list, without first splitting
> the string into lists appropriately.
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...
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
|