• 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: Why is a-b not equal to ((source of a) -b) ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why is a-b not equal to ((source of a) -b) ?


  • Subject: Re: Why is a-b not equal to ((source of a) -b) ?
  • From: Emmanuel <email@hidden>
  • Date: Thu, 5 Sep 2002 08:12:04 +0200

At 4:56 AM +0200 3/9/02, bill fancher wrote:
>
>> set ms3 to (GetMilliSec -ms2)
>
>Try:
>
>set ms3 to (GetMilliSec) - ms2

>Without the parentheses, it thinks -ms2 is the target for the
>GetMilliSec event (I haven't verified that).

At 11:01 PM +0200 3/9/02, email@hidden wrote:
>The base cause of the behavior is that
>
> GetMilliSec -var1
>
>is being parsed as
>
> GetMilliSec of (-var1)

Using commands like if they were functions may be fairly misleading. For
instance (using the Satimage osax):

--------------
cos (a) + b
--------------

actually computes

--------------
cos (a + b)
--------------

so you would rather write:

--------------
(cos (a)) + b
--------------

Parenthesizing osaxim's commands is often required, for instance you the
following does not work - though there is no ambiguity here:

--------------
button returned of display dialog "hello"
--------------

Emmanuel
_______________________________________________
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.

  • Follow-Ups:
    • Re: Why is a-b not equal to ((source of a) -b) ?
      • From: Timothy Bates <email@hidden>
References: 
 >Why is a-b not equal to ((source of a) -b) ? (From: Timothy Bates <email@hidden>)
 >Re: Why is a-b not equal to ((source of a) -b) ? (From: bill fancher <email@hidden>)

  • Prev by Date: Scripting Quark 5.01 from Jaguar
  • Next by Date: Re: ASDebugging.h documentation
  • Previous by thread: Re: Why is a-b not equal to ((source of a) -b) ?
  • Next by thread: Re: Why is a-b not equal to ((source of a) -b) ?
  • Index(es):
    • Date
    • Thread