• 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: number
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: number


  • Subject: Re: number
  • From: Jim Witte <email@hidden>
  • Date: Fri, 14 Oct 2005 20:20:08 -0500

This works:

script o
    property x : -1.780654340609
    property y : -5
end script
-(o's x as real)

The '<x>'s <y>' syntax only seems to return a real number (try "o's x"), but the minus operator doesn't see that it returned a number, unless it's coerced explicitly to a real.  This is one example of 'common sense type coercion' that AS doesn't do that drives me nuts..

  I assume "get o's x" specifically sets the type of the return value correctly.  I'd call this a bug..

Jim                               '                                                  

On Sep 22, 2005, at 4:09 AM, jj wrote:

script o 

    property x : -1.780654340609

end script 

-(o's x) 



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: number
      • From: Emmanuel <email@hidden>
  • Prev by Date: Re: Perhaps OT: how to make a custom CD that opens upon insertion to a window with custom background and icons
  • Next by Date: Re: Make AppleScript Create an AppleWorks Spreadsheet? (Applescript-users Digest, Vol 2, Issue 667)
  • Previous by thread: Re: Perhaps OT: how to make a custom CD that opens upon insertion to a window with custom background and icons
  • Next by thread: Re: number
  • Index(es):
    • Date
    • Thread