• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: Rounding numbers up
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Rounding numbers up


  • Subject: RE: Rounding numbers up
  • From: "Pitcher, George" <email@hidden>
  • Date: Fri, 16 Mar 2001 07:18:29 -0000

How about using mod?

if mod (x/1) <> 0 x=x+1

I know it's not AS syntax but I don't need to do that sort of stuff so never
bothered to check it out.

HTH

George P in Edinburgh

> -----Original Message-----
> From: Edmond Cho [mailto:email@hidden]
> Sent: 16 March 2001 06:52
> To: email@hidden
> Subject: Rounding numbers up
>
>
> I remember seeing a method to do this, but have been unable
> to find any
> reference to rounding numbers in the Language Guide.
>
> The calculation I am after is not strictly rounding to the
> nearest integer
> but rounding UP to the next whole number.
>
> 1.6 ---> 2
> 2.1 ---> 3
> 1.4 ---> 2
>
> So, any remainder results in rounding up.
> Any tips?
>
> Thanks.
> Ed Cho
> Colorhythm
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com
> _______________________________________________
> applescript-users mailing list
> email@hidden
> http://www.lists.apple.com/mailman/listinfo/applescript-users


  • Prev by Date: Re: Rounding numbers up
  • Next by Date: Re: Rounding numbers up
  • Previous by thread: Re: Rounding numbers up
  • Next by thread: Re: Rounding numbers up
  • Index(es):
    • Date
    • Thread