• 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: by-value vs by reference (was Re: list question)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: by-value vs by reference (was Re: list question)


  • Subject: Re: by-value vs by reference (was Re: list question)
  • From: Doug McNutt <email@hidden>
  • Date: Thu, 5 Jun 2003 19:47:04 -0600

At 18:14 -0400 6/5/03, Andrew wrote:
>Here's a quick re-cap of all the information that's been passed on in this
>thread with some definitions.
SNIP

I learned a few things from that. Thank you. In spite of comments by others, it does help to compare AppleScript to other compilers.

Just for fun I tried your imaginary Applescript.. I would like to nominate the error message for an obfuscated Applescript contest:

set a to 3
set b to a
set c to a + b
c
--> 6
set the value of a to 4
set c to a + b
c
--> can't set value of 3 to 4

set a.value to 4

Generates a much better rejection.
"An unknown token can't go after this identifier" (with the "a" selected.)

It appears that my "a" isn't a reference to an object at all. The compiler may well be nothing more than a macro processor which replaces "a", when it sees it, by its current lexical value. That would confuse the error processor which would see:

set the value of 3 to 4

which, of course, it "can't do".

--

Applescript syntax is like English spelling:
Roughly, but not thoroughly, thought through.
_______________________________________________
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: by-value vs by reference (was Re: list question)
      • From: Michelle Steiner <email@hidden>
    • Re: by-value vs by reference (was Re: list question)
      • From: Paul Berkowitz <email@hidden>
References: 
 >by-value vs by reference (was Re: list question) (From: Andrew <email@hidden>)

  • Prev by Date: Re: Strange Bottleneck
  • Next by Date: Re: by-value vs by reference (was Re: list question)
  • Previous by thread: by-value vs by reference (was Re: list question)
  • Next by thread: Re: by-value vs by reference (was Re: list question)
  • Index(es):
    • Date
    • Thread