• 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?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: magic integer converter number 62?


  • Subject: Re: magic integer converter number 62?
  • From: "Arthur J Knapp" <email@hidden>
  • Date: Wed, 21 Feb 2001 11:56:21 -0500

> Date: Mon, 19 Feb 2001 17:36:01 -0800 (PST)
> From: =?iso-8859-1?q?M=20Shaw?= <email@hidden>
> Subject: magic integer converter number 62?

> 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

In what sense does the second statement not work? I don't
get an error, and I don't know what it is that you are trying
to do.

In any case, have you examined it step by step? Just break
the parentheses apart:

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

2.6 mod 1 --> 0.6
2.6 - result --> 2.0
x + result --> 64
result - x --> 2
result as integer --> 2

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

2.6 mod 1 --> 0.6
2.6 - result --> 2.0
x + result --> 63
result - x --> 2
result as integer --> 2


--
{
Arthur J Knapp, of STELLARViSIONs ;

http://www.STELLARViSIONs.com ;

mailto:email@hidden ;

http://developer.apple.com/techpubs/
macos8/InterproCom/AppleScriptScripters/
AppleScriptLangGuide/
}


  • Follow-Ups:
    • Re: magic integer converter number 62?
      • From: Kevin Windham <email@hidden>
    • Re: magic integer converter number 62?
      • From: JollyRoger <email@hidden>
  • Prev by Date: Re: Why is there this Facespan versus Dialog Director thing?
  • Next by Date: Scriptable Text Editor
  • Previous by thread: Re: magic integer converter number 62?
  • Next by thread: Re: magic integer converter number 62?
  • Index(es):
    • Date
    • Thread