Re: Can someone explain this?
Re: Can someone explain this?
- Subject: Re: Can someone explain this?
- From: "Mark J. Reed" <email@hidden>
- Date: Sat, 14 Mar 2009 14:34:00 -0400
On Sat, Mar 14, 2009 at 2:31 PM, Michelle Steiner
<email@hidden> wrote:
> On Mar 14, 2009, at 10:43 AM, Mark J. Reed wrote:
>
>>> So a better comparison would be if -3^2 was +9, but ---3^2 was -9.
>>
>> Er, assuming ---3^2 wasn't ignored as a comment by AppleScript, that is.
>> :)
> ---3^2 is treated as a comment.
> -- -3^2 is treated as a comment
> - --3^2 generates a compile error
> - - -3^2 compiles to -3^2 and returns 9.0
> --3^2 is treated as a comment
> - -3^2 compiles to 3^2 and returns 9.0
> -3^2 compiles to itself and returns 9.0
> and of course -(3^2) returns -9.0
Thanks for the exhaustive list. :)
I was going for your fourth case: clearly, negating a number twice
should not affect the result - just like adding "the" in the original
example.
But in my haste I neglected to include the spaces between the minus
signs necessary to keep AS from interpreting it as a comment marker,
hence my followup email you quoted above.
--
Mark J. Reed <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