• 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: Paul Berkowitz <email@hidden>
  • Date: Sun, 18 Aug 2002 17:50:38 -0700

On 8/18/02 5:24 PM, "Chuck Ross" <email@hidden> wrote:

> Can anyone give me an easy way to get the Int of a number, converting,
> for instance, 6.1 into 6?

to int(x)
try
set x to x div 1
return x
on error
display dialog (x as string) & " is not a number." & return & return
& "You have to start with a number, or a string that can be coerced to a
number."
error number -128 -- quit
end try
end int

int(6.1)
--> 6


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

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