Rounding off things...

David Vaughan dvk at dvkconsult.com.au
Mon Dec 30 01:53:01 EST 2002


On Monday, Dec 30, 2002, at 15:28 Australia/Sydney, Matt Denton wrote:

> Hello Dear List,
>
> I'm just trying to Round off my year...
>
> so pardon me if I'm w-ong but:
>
>     put round(-0.1)
>
> Shouldn't that return 0 and not -0??
>
> -0 is what? The smallest point ever imaginable beyond 0 in the negative
> direction?
>
> Is this a bug or should I dig out my old school books?  I imagine it 
> is just
> me...

Matt

It is zero. Try this code:
    get round(-0.1)
    put it		-- returns -0
    put (it < 0)	--returns false.

Does this still leave you with a problem (or was it only existential)?

regards
David
>
> (Anyway better race back to cooking up our New Year's feast, I'm being
> hounded off the Mac).
>
> M at tt
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the use-livecode mailing list