• 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: real comparison problems [Re: ASTest redux]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: real comparison problems [Re: ASTest redux]


  • Subject: Re: real comparison problems [Re: ASTest redux]
  • From: Mark Alldritt <email@hidden>
  • Date: Mon, 30 Sep 2002 08:15:51 -0700

> If anything, AppleScript (or a script debugger [1]) might adopt a similar
> form...where the "bare" number is not rounded but
> number as string
> is. But then you have the silent coercions, as in
> display dialog .7
> which would show .7, probably, and cause yet more confusion.
>
> Aside...as it happens,
>>>> .50 - .01
> 0.48999999999999999
> (or the same as .49). That is certainly not guaranteed (or is it??...it is
> true for the examples I've tried)...it does work for .49.
>
> --John
>
> [1] Actually, it looks as if Script Debugger (3.0.4) tries to and botches
> the job: it shows the result of
> set x to 0.7
> as 0.7 in the result window in "Source" and "Best" form, and as 1.91875
> (huh????) in AEPrint form. THAT does look like a bug (not
> AppleScript...probably a problem with the wrong floating point
> representation being used by the AEPrint library).

Script Debugger relies on AppleScript and the AEPrint library to display all
values. Script Debugger 3.0.3 and below use a hacked version of the AEPrint
library that fixed the problems displaying real values. However, with the
advent of Mac OS X 10.2, this hacked version no longer works. SD3.0.4 and
later revert to using the standard system AEPrint code which is (still)
buggy when it comes to displaying reals even though I filed a bug on this
almost a year ago.

Cheers
-Mark

---------------------------------------------------------------------
Mark Alldritt Late Night Software Ltd.
Phone: 250-380-1725 333 Moss Street
FAX: 250-383-3204 Victoria, B.C.
WEB: http://www.latenightsw.com/ CANADA V8V-4M9
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: real comparison problems [Re: ASTest redux]
      • From: Philip Aker <email@hidden>
  • Prev by Date: Re: revisiting the prefs file issue
  • Next by Date: ANNOUNCE: XML Tools 2.5
  • Previous by thread: Re: real comparison problems [Re: ASTest redux]
  • Next by thread: Re: real comparison problems [Re: ASTest redux]
  • Index(es):
    • Date
    • Thread