• 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: "Nigel Garvey" <email@hidden>
  • Date: Fri, 23 Sep 2005 21:25:34 +0100

kai wrote on Thu, 22 Sep 2005 23:17:52 +0100:

>On 22 Sep 2005, at 14:51, Nigel Garvey wrote:
>
>> Or:
>>
>>   -(get o's x)
>>
>> Or:
>>
>>   -(o's x as number)
>>
>> Or:
>>
>>   (o's x) * -1
>>
>> Or:
>>
>>   0 - (o's x)
>
>Or:
>
>-(a reference to o's x)

So only _compiled_ references are affected.

>Or:
>
>tell o's x to -it
>
>(But now I'm just playing. Personally, I'd stick with the more direct
>'get'.) ;-)

Here's some more fun. Bernard e-mailed me off list to ask why his
original script does work if the number involved is an integer.

  script o
    property x : 1
  end script

  -(o's x)
  --> -1

So the problem's with compiled references and reals. However, fooling
around a bit more, we find that the script also works (ie. doesn't throw
errors) with whole-number reals -- except that the results are integers!

  script o
    property x : 273.0
  end script

  -(o's x)
  --> -273

As jj says, it must be a bug. But I'd love to know what's behind it. The
effect's the same in Tiger, Jaguar, and OS 8.6, so it's been around for a
while....

NG

 _______________________________________________
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: kai <email@hidden>
  • Prev by Date: Re: Using terms from syntax
  • Next by Date: Re: Getting info back from iCal: missing values ?
  • Previous by thread: Re: number
  • Next by thread: Re: number
  • Index(es):
    • Date
    • Thread