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

Re: Int Function


  • Subject: Re: Int Function
  • From: Reinhold Penner <email@hidden>
  • Date: Sun, 18 Aug 2002 16:58:38 -1000

On Sunday, August 18, 2002, at 04:36 , Paul Berkowitz wrote:

> On 8/18/02 7:23 PM, "Christopher Nebel" <email@hidden> wrote:
>
>>> Can anyone give me an easy way to get the Int of a number, converting,
>>> for instance, 6.1 into 6?
>>
>> "round" from Standard Additions will do what you want.
>
> Any particular reason why you favor an Addition over the native
> AppleScript
>
> div 1

"round" and "div" serve different purposes, they're not equivalent. I
guess it all depends on whether or not you want the number rounded or
just truncated:

set x to 6.7 div 1 --> 6
set x to round 6.7 --> 7

-Reinhold
_______________________________________________
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: Int Function (From: Paul Berkowitz <email@hidden>)

  • Prev by Date: Re: Int Function
  • Next by Date: Re: getting a file list in sorted order
  • Previous by thread: Re: Int Function
  • Next by thread: (was Int Function) mod bug
  • Index(es):
    • Date
    • Thread