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

Re4: magic integer converter number 62? - Joking???


  • Subject: Re4: magic integer converter number 62? - Joking???
  • From: ThK <email@hidden>
  • Date: Thu, 22 Feb 2001 13:09:52 +0100

Hi John, Dear Paul,

On 21.02.2001 at 18:42 Uhr, John W Baxter <email@hidden> wrote:

>
>Mathematically, the result is always 2, no argument.
>
>Computationally, the result is always "about 2". And in a few surprise
>cases the "about 2" is exactly 2.
>
> --John
>--
>John Baxter email@hidden Port Ludlow, WA, USA
>

Some more:

>set x to 61
>set b to ((x + (2.6 - (2.6 mod 1))) - x) as integer

For sure, 2.0 is of class "real" not of class "integer".

If you'd write:

set x to 61
set b to ((x + (2.6 - (2.6 mod 1))) - x) as REAL

--> 2.0

it works.


If you want to have an integer then add the line:

set b to (round of b) as integer

--> 2

Then "as REAL" is optional, because the result already is of class real.


Always have an eye on the class of the result. This is most important.


Regards,

Thomas

_______________________________________
Thomas Johannes Matthias Kuehner

Developer
AppleScripter
Administrator
Webmaster

macgix - software,network,consulting
http://www.macgix.com

http://www.ScriptMyMac.de


  • Prev by Date: One Page at a time in Word
  • Next by Date: AW: Using the filter form
  • Previous by thread: Re: magic integer converter number 62? - Joking???
  • Next by thread: Re: magic integer converter number 62? - Joking???
  • Index(es):
    • Date
    • Thread