• 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: another interesting bug.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: another interesting bug.


  • Subject: Re: another interesting bug.
  • From: Deivy Marck Petrescu <email@hidden>
  • Date: Mon, 31 Aug 2009 19:18:23 -0400


On Aug 31, 2009, at 5:54 PM, Luther Fuller wrote:

On Aug 31, 2009, at 4:07 PM, Deivy Petrescu wrote:
You are running Snow  Leopard, could you please run the script above in AS Editor both in 64- and 32-bit and report back.
Thank you.

I AppleScript Editor I get ...
set e to -10004
display dialog e --> 4294957292
return e --> -10004

In Smile I get ...
set e to -10004
display dialog e --> -10004
return e --> -10004

I compiled this script ...
on run
my test()
display dialog the result
end run

on test()
set e to -10004
display dialog e 
delay 1
return e 
end test

as an un-editable application bundle via AppleScript Editor. Very interesting!

When first compiled, the "Open in 32 bit mode" is unchecked and the result is ...
First dialog --> 4294957292
Second dialog --> 4294957292

I then checked "Open in 32 bit mode" and double-clicked it again with the result ...
First dialog --> -10004
Second dialog --> -10004

Mmmmmmm!



Actually, I've just tried running AS in 64-bit and 32-bit and I could not reproduce what I said it happens last night.
I was probably dreaming!!!

As a side note, a huge thanks to Doug!
You actually helped any scripter to deal with negative number  in SL
Remember the date problem that Chris Nebel pointed out was due to 64-bit AS.

set m to current date
set m to l-1*days
(m-l)/(1*days)

---> 4.97092696296296E+4


Using Doug' s solution on the other hand"

set m to current date
set m to l-1*days
(2^32-(m-l))/1*days
---> -1.0


Deivy Petrescu
email@hidden



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >another interesting bug. (From: Deivy Petrescu <email@hidden>)
 >Re: another interesting bug. (From: Deivy Petrescu <email@hidden>)
 >Re: another interesting bug. (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: Snow Arithmetic
  • Next by Date: I would appreciate help with this one.
  • Previous by thread: Re: another interesting bug.
  • Next by thread: load file statement not finding files with Snow Leopard
  • Index(es):
    • Date
    • Thread