• 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: Strange numbers to AS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange numbers to AS


  • Subject: Re: Strange numbers to AS
  • From: Christopher Nebel <email@hidden>
  • Date: Fri, 2 May 2003 16:01:45 -0700

On Friday, May 2, 2003, at 03:10 PM, Thomas C. wrote:

Why does this returns true in the script editor ?

305032704 = ("4600000000" as number)

If I just enter 4600000000 in the script editor and check syntax, it becames 305032704 !
Why ?

It's the same bug in two different places in AppleScript -- the first is in string-to-number conversion, the second is in the parser.

Integers in AppleScript only go up to 2^29 (about 500 million). There's a check that tries to promote too-large numbers into reals, but you've found a case that slips through the overflow detection and produces a nonsensical result. Write a bug.


--Chris Nebel
Apple Development Tools
_______________________________________________
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.

References: 
 >Strange numbers to AS (From: "Thomas C." <email@hidden>)

  • Prev by Date: Re: mac to unix path names
  • Next by Date: Re: open for access question
  • Previous by thread: Re: Strange numbers to AS
  • Next by thread: Unicode/UTF confusion
  • Index(es):
    • Date
    • Thread