Re: Strange numbers to AS
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.