• 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: Dates gone wild
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dates gone wild


  • Subject: Re: Dates gone wild
  • From: Nigel Garvey <email@hidden>
  • Date: Wed, 10 Sep 2003 12:18:09 +0100

Chris Page wrote on Tue, 9 Sep 2003 21:53:58 -0700:

>There are objects, and there are things that refer to objects.
>
>Those things that refer to objects are properties, variables,
>arguments, and the items of lists and records.
>
>Some objects are mutable -- you can change them -- like lists and
>records, and some are not, like numbers and strings.
>
>More than one property, variable, argument, etc. can refer to the same
>object.
>
>If the object is mutable, and you change it, that change will be
>visible to everything that refers to it.
>
>'set' makes a variable, etc., refer to an object.
>
>'copy' makes a copy of an object, then makes a variable, etc. refer to
>the copy.
>
>That's it.

Very nicely put! :-) - though I think it might deepen Doug's confusion
about the difference between pointers and references. Everywhere where
you use "refer" above, I'd use "point" to avoid confusion with
AppleScript "references".

"Pointer" is not a term used in AppleScript, but it's used in lower-level
languages to describe a numeric value that represents the address in
memory of another value. That's what variables are beneath the surface.
Where a script says "get a", the low level action is "get the address
currently stored in the slot that the compiler associates with 'a'. This
address is the first of a couple of jumps to a value which interests us."

A "reference" *is* an entity in the AppleScript language and in
application scripting. It's not a memory pointer, but a description in
the language itself. This description invariably involves more than one
word and includes a possessive element - eg. 'item 2 of theList',
'theList of <<script>>', 'every item of theFolder whose name contains
"rabbit"', 'my aardvark', etc. References are used all the time in the
text of scripts, where they usually return the values of the described
items. In many cases, they can also be stored in variables - which is
sometimes convenient.

NG
_______________________________________________
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:
    • Bindings and object mutability (was Re: Dates gone wild)
      • From: Chris Page <email@hidden>
    • Re: Dates gone wild
      • From: Emmanuel <email@hidden>
  • Prev by Date: Re: Workaround for terminology conflicts
  • Next by Date: Re: checking for characters
  • Previous by thread: Re: Dates gone wild
  • Next by thread: Re: Dates gone wild
  • Index(es):
    • Date
    • Thread