• 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: Paul Berkowitz <email@hidden>
  • Date: Fri, 16 Mar 2001 00:05:04 -0800

Wow. Lots of odd syntax there, that doesn't mean anything in AS. Maybe you
mean

if mod (x / 1) /= 0 then
set x to div (x / 1) + 1
else
set x to div (x / 1)
end if

?

--
Paul Berkowitz

On 3/15/01 11:18 PM, "Pitcher, George" <email@hidden> wrote:

> 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
> _______________________________________________
> 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: Text Grab from an Outlook Express email
  • Previous by thread: Re: Rounding numbers up
  • Next by thread: Re: Rounding numbers up
  • Index(es):
    • Date
    • Thread