numberFormat affecting array keys???

Bob Sneidar bobsneidar at iotecdigital.com
Fri Apr 21 12:03:59 EDT 2017


Sorry. Change that to:
put formatNumber(i, "00") into myArray [i]
and it does NOT work. adding 0 to the value with numberFormat set to "00" does NOT format the number. SHEESH!

Working on it. 

Bob S


> On Apr 21, 2017, at 08:58 , Bob Sneidar via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> Okay simple solution: 
> 
> on mouseUp
>   repeat with i = 1 to 10
>      put formatNumber(i) into myArray [i]
>   end repeat
>   breakpoint
> end mouseUp
> 
> function formatNumber pSourceString, pFormat
>   set the numberFormat to pFormat
>   add 0 to pSourceString
>   return pSourceString
> end formatNumber
> 
> This works because numberFormat gets reset once the handler exits. DOH! 
> 
> Bob S
> 
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list