Re: Int Function
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.