numberFormat affecting array keys???
Mark Waddingham
mark at livecode.com
Fri Apr 21 11:18:52 EDT 2017
On 2017-04-21 16:33, Bob Sneidar via use-livecode wrote:
> I got that wrong. I could say I expected the value to be 01. Also if
> you see the value of i in the debugger, it indicates that the value
> of i is 1 and NOT 01. So it HAS to be the array designation that is
> doing it.
Yes - i is a number (as it is the index of the for loop) so the value
of the array element is a number, and so appears as '1' (not affected
by numberFormat).
However, array keys are *always* strings, so when you set the array key
numberFormat comes into play and the key is '01' and not '1'.
Warmest Regards,
Mark.
--
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps
More information about the use-livecode
mailing list