Negative Numbers and NumberFormat

J. Landman Gay jacque at hyperactivesw.com
Wed Apr 5 19:42:58 EDT 2017


On 4/5/17 5:48 PM, Richard Gaskin via use-livecode wrote:
> Jacque wrote:
>
>> HyperCard distinguished between "#" and "0" and produced different
>> results. It sounds like LC doesn't?
>
> Confirmed - running this script in v9dp6 and again all the way back in
> v6.0:
>
> on mouseUp
>    set the numberformat to "###.###"
>    put 2.5 + 2.5 into x
>    set the numberformat to "000.000"
>    put 2.5 + 2.5 into y
>    put x &cr& y
> end mouseUp
>
> ...I get:
>
> 005.000
> 005.000
>
> Where I would have expected:
>
> 5.0
> 005.000
>
> Who wants to file the bug report?
>

The fact that the dictionary also doesn't discriminate implies it isn't 
a bug, it's intentional, and the hash/zero options are for HC 
compatibility only. I can't remember if MC worked as I would have expected.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list