Language Guide

CHAPTER 6
Expressions
160 Reference Expressions
on error m number n from f to t partial result p
--also reset text item delimiters in case of an error:
set AppleScript's text item delimiters to ¬
savedTextItemDelimiters
--and resignal the error:
error m number n from f to t partial result p
end try
Reference Expressions 6
References are compound names that refer to objects in applications, the
system, or AppleScript. Because each object has a value, a reference can be
used to represent a value in a script. A reference expression is a reference
that AppleScript interprets as a value.
A reference can function as a reference to an object or as a reference expression.
When a reference is the direct parameter of a command, it usually functions as
a reference to an object, indicating to which object the command should be
sent. In most other cases, references function as expressions, which AppleScript
evaluates by getting their values.
For example, the reference in the following example is a reference to an object.
It identifies the object to which the Copy command is sent.
copy word 1 of front document of application "Scriptable Text Editor"
On the other hand, the reference in the following example is a reference
expression:
repeat (word 1 of front document of application
"Scriptable Text Editor") times
display dialog "Hello"
end repeat