• 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: Highlights of AppleScript 1.5.5 in Mac OS 9.1
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Highlights of AppleScript 1.5.5 in Mac OS 9.1


  • Subject: Re: Highlights of AppleScript 1.5.5 in Mac OS 9.1
  • From: "Arthur J Knapp" <email@hidden>
  • Date: Wed, 10 Jan 2001 10:52:35 -0500

> Subject: Re: Highlights of AppleScript 1.5.5 in Mac OS 9.1
> Date: Tue, 9 Jan 2001 23:55:39 +0000
> From: Nigel Garvey <email@hidden>

> Chris Espinosa wrote on Tue, 09 Jan 2001 14:43:14 -0800:
>
>>ROUND LIKE TAUGHT IN SCHOOL
>
> Urghh! That's even worse than the promised 'as taught in school'! Is that
> "International English", perhaps?

No, it's American, the update to English. ;-)

> If it's as fast as the current 'round', it'll still be seventeen times
> quicker to use a handler:
>
> on rnd(n)
> n div 0.5 - n div 1
> end
>
> on rndIEEE(n)
> if (n mod 2) ^ 2 > 0.25 then return n div 0.5 - n div 1
> n div 1
> end rndIEEE
>
> rnd(122.5)
> --> 123
>
> rndIEEE(122.5)
> --> 122

Wow, these are great. I wish I could get a handle on exactly what
the IEEE standard is trying to accomplish, (I'm pretty thick when
it comes to math). :)


There are a lot of instances of where scripting additions are
considerably slower than "native" AppleScript code. I often don't
understand what the point of the Apple-provided osaxen is for. If
the AppleScript team wants to implement a rounding command, why
not just build it into the core language?


> NG

and "NG" shall be our battle cry...


--
{
Arthur J Knapp, of STELLARViSIONs ;

http://www.STELLARViSIONs.com ;

mailto:email@hidden ;

"... but I could be anyone"
"No you couldn't, sir ..."
}


  • Follow-Ups:
    • Re: Highlights of AppleScript 1.5.5 in Mac OS 9.1
      • From: John W Baxter <email@hidden>
  • Prev by Date: Re: Aplescript for changing case (again)
  • Next by Date: Re: I successfully converted a stand-alone script into anextension!
  • Previous by thread: Re: Highlights of AppleScript 1.5.5 in Mac OS 9.1
  • Next by thread: Re: Highlights of AppleScript 1.5.5 in Mac OS 9.1
  • Index(es):
    • Date
    • Thread