curious "go to" behaviour
Jacques Hausser
jacques.hausser at ie-zea.unil.ch
Fri Apr 30 02:44:07 EDT 2004
>> Other scripts of this stack use card names in variables (including "KF
>> 0") without problems. It's not a question of life and death, but I'm
>> puzzled...
>>
>> Thank you for any hint!
>
> This is a wild guess.
>
> Array keys are strings. The property numberFormat is applied to any
> result of arithmetic to make the key. If you use the default
> numberFormat and keys are always the result of arithmetic, then the
> keys for numbers will be the same for any two values that are equal
> numerically.
>
> However, sometimes in loops the initial value is not the result of
> arithmetic. If it is, say, "00" " 0" or "0.", then there might not be
> a match.
>
> This can apply to either the building of arrays or the creation of keys
> for later lookup. You can check in the building of the array by
> dumping the keys.
>
> Dar Scott
Thanks, Dar
I checked it. No, in every case all my keys (and bc too) look like
plain integers. But it could be useful to remember your suggestion in
other circumstances!
Jacques
******************************************
Prof. Jacques Hausser
Department of Ecology and Evolution
Biology Building
University of Lausanne
CH-1015 Lusanne-Dorigny
tel: ++ 41 21 692 41 62
e-mail: jacques.hausser at ie-zea.unil.ch
*******************************************
More information about the use-livecode
mailing list