Re: How to coerce a real to an integer in X?
Re: How to coerce a real to an integer in X?
- Subject: Re: How to coerce a real to an integer in X?
- From: Michelle Steiner <email@hidden>
- Date: Fri, 1 Feb 2002 11:49:56 -0700
On 2/1/02 10:46 AM, Bob.Kalbaugh <email@hidden> wrote:
>
All-in-all, Your guess is probably way better than mine, but I think it is
>
just AS helping us out in the first example. We're NOT using the "as"
>
operator. And it's undocumented anywhere.
I've been fiddling with this. The only syntax that works is "integer
(number)" I tried "integer of number", and got an error. And, as you
found, "number as integer" also fails.
The following results are from the Event Log window:
script
integer (5.3)
tell current application
get integer "5.3"
--> 5
end tell
result
tell application "Claris Emailer"
integer ("5.3")
end tell
script
tell application "Claris Emailer"
integer ("5.3")
end tell
result
tell application "Claris Emailer" (ditto for BB Edit)
get integer "5.3"
--> 5
end tell
however...
script
tell application "Finder"
integer ("5.3")
end tell
result
tell application "Finder"
get integer "5.3"
--> Finder got an error: Can't get integer "5.3".
--Michelle
----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------