OIC. NumberFormat is a STRING function. So then...: set the numberFormat to "00"; put 1+1 into tValue; put tValue produces "02" because livecode converts EVERYTHING to a string before outputting it. It makes more sense I suppose to put it that way. I have gotten into the habit of thinking that numbers are numbers because it happens so seamlessly.
It really doesn't matter though, because the bottom line is that I need to create my own number formatting function, which is no big deal. If it's any good I'll post it for review and refinement. Bob S > On Apr 21, 2017, at 08:18 , Mark Waddingham via use-livecode > <[email protected]> wrote: > > 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 ~ [email protected] ~ http://www.livecode.com/ > LiveCode: Everyone can create apps _______________________________________________ use-livecode mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
