Re: magic integer converter number 62? - Joking???
Re: magic integer converter number 62? - Joking???
- Subject: Re: magic integer converter number 62? - Joking???
- From: Michelle Steiner <email@hidden>
- Date: Thu, 22 Feb 2001 07:29:43 -0800
On 2/22/01 12:04 AM, Ed Stockly <email@hidden> wrote:
>
>(2.6 - (2.6 mod 1)) as integer
>
>--> Can't make 2.0 into an integer
>
>
>
>
What am I missing here? All three correctly return the value of 2 on my mac
<...>
>
Have you tried it in Script Editor? Could there be an Osax interfereing
>
with the numeric coercion? Is it possible I have an Osax that facilitates
>
the coercion?
I tried it in script editor, and don't have any osaxen that should affect
this calculation.
However, ThK wrote me that this works
set x to 61
set b to ((x + (2.6 - (2.6 mod 1))) - x) as REAL
--> 2.0
But if you need an integer, not a real, then adding this line gives the
correct result
set b to b div 1
--> 2
However, this does not work, resulting in the same error as originally
encountered:
set b to b as integer
--Michelle
----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------