rounding up with < .5 ?
Zac Elston
zelston at aol.com
Thu Mar 14 16:47:01 EST 2002
I'd like to round 5.2 up to 6. Neither round or statround seem to allow me
to do this. For both, using precision 0 gives me 5, -1 gives me 10 and 1
gives me 5.3. (I do understand the difference between the two)
Is there a way to check if a var is an int or float? and convert?
I can see doing do char evals with
set the itemdel to "."
if the number of items in MyNumb >1 then
put item 1 of MyNumb + 1 into MyRoundUpNum
end if
Maybe I'm going about this all wrong. any pointers?
thanks
-zac
More information about the use-livecode
mailing list