Language Guide

Results of Expressions 149
CHAPTER 6
Expressions 6
Figure 6-0
Listing 6-0
Table 6-0
An expression is any series of AppleScript words that has a value. You use
expressions to represent or derive values in scripts. When AppleScript
encounters an expression, it converts it into an equivalent value. This is
known as evaluation.
Chapter 3 describes and gives examples of the simplest kinds of expressions,
called literal expressions, which are representations of values in scripts. This
chapter begins by describing how to evaluate expressions. It then describes five
additional types of expressions:
variables and script properties, which are named containers for values
the AppleScript property Text Item Delimiters, which determines the text
item delimiters used by AppleScript in all scripts
reference expressions, which are expressions that derive the value of
an object
operations, which are expressions that derive values from other values
Results of Expressions 6
The result of any expression is its value.You can use the Script Editor to
display the result of an expression by typing an expression on a line by
itself and running the script. AppleScript returns the value of the expression.
Here’s an example:
1. Open the Script Editor if it is not already open.
2. Type the following expression in the editor subwindow:
3 + 4