• 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: Can someone explain this?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Can someone explain this? (From: Michelle Steiner <email@hidden>)
 >Re: Can someone explain this? (From: Philip Aker <email@hidden>)
 >Re: Can someone explain this? (From: Deivy Marck Petrescu <email@hidden>)
 >Re: Can someone explain this? (From: "Mark J. Reed" <email@hidden>)
 >Re: Can someone explain this? (From: "Mark J. Reed" <email@hidden>)
 >Re: Can someone explain this? (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: Can someone explain this?
  • Next by Date: Re: Can someone explain this?
  • Previous by thread: Re: Can someone explain this?
  • Next by thread: Re: Can someone explain this?
  • Index(es):
    • Date
    • Thread