• 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: magic integer converter number 62? - Joking???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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. |
----------------------------------------------------------------------


  • Prev by Date: Re: magic integer converter number 62?
  • Next by Date: RE: Has the 5th business day of the month passed???
  • Previous by thread: Re4: magic integer converter number 62? - Joking???
  • Next by thread: Re: magic integer converter number 62? - Joking???
  • Index(es):
    • Date
    • Thread