rounding up with < .5 ?
Jacqueline Landman Gay
jacque at hyperactivesw.com
Thu Mar 14 23:23:01 EST 2002
On Thursday, March 14, 2002, at 08:41 PM, "Subscriber"
<subscriber at btopenworld.com> wrote:
> if trunc(x)=x then --check the number is an integer
> return x
> else
> return (trunc(x)+1) -- if not then return the next integer
> above
> end if
The above works fine, but just for the record, there is also the "is an
integer" test:
put 1 is an integer -- TRUE
put 2.3 is an integer -- FALSE
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list