• 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 integers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rounding integers


  • Subject: Re: rounding integers
  • From: Paul Berkowitz <email@hidden>
  • Date: Fri, 31 Oct 2003 10:11:26 -0800

On 10/31/03 9:17 AM, "Chet Goetz" <email@hidden> wrote:

>
> Thanks for the advice, but your code gives me an error:
> "Can't make 314.159265358979 into a integer."
>
> Am I doing something wrong?
>
> chet
>
> On Friday, October 31, 2003, at 10:37 AM, Steve Mills wrote:
>
>> set n to ((pi * 100) as integer) / 100

You need OS 10.3 (AS 1.9.2) for '[real] as integer' coercion to work. In
older OS's use the '(round ([real] * 100)) /100' method Donald sent in.

--
Paul Berkowitz

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: rounding integers (From: Chet Goetz <email@hidden>)

  • Prev by Date: Re: rounding integers
  • Next by Date: Re: repeat loops on Eudora messages
  • Previous by thread: Re: rounding integers
  • Next by thread: Re: rounding integers
  • Index(es):
    • Date
    • Thread