• 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: Ed Stockly <email@hidden>
  • Date: Thu, 22 Feb 2001 00:04:12 -0800

> Can anybody figure out why this works:
> set x to 62
> set b to ((x + (2.6 - (2.6 mod 1))) - x) as integer
>
> and this doesn't:
> set x to 61
> set b to ((x + (2.6 - (2.6 mod 1))) - x) as integer

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

: \

Now, if we remember our 'new math' it shouldn't matter what value you give
x. It is added then subtracted from the equation and, since addition is
commutative, it should have no net effect on the result. In both cases the
value of b must be:

(2.6 - (2.6 mod 1))

Which is 2.

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?

ES?



*would not be surprised if I'm not getting the joke or missing something
rather obvious*
: {
-- <http://justapplescript.weblogs.com/>
-- <http://justapplescript.weblogs.com/AppleScriptLearningResources>
-- Feedback welcome, join today!


  • Prev by Date: Re: magic integer converter number 62? - Joking???
  • Next by Date: Re: Missing Digests
  • Previous by thread: Re: magic integer converter number 62? - Joking???
  • Next by thread: Re4: magic integer converter number 62? - Joking???
  • Index(es):
    • Date
    • Thread