Abbreviations and Synonyms

Many AppleScript terms permit other terms to be substituted for them. For example, the following expressions are equivalent in pairs, assuming that a and b are defined:

a is less than b
a < b
 
a is b
a = b

Some terms have a very large number of equivalents. For example, these expressions all amount to the same thing:

a ≤ b
a <= b
a less than or equal b
a is less than or equal to b
a is not greater than b
a isn't greater than b
a does not come after b
a doesn't come after b

To add to the confusion, upon decompilation, AppleScript might substitute one equivalent for another (see "Decompiling" in Chapter 3). So the code in the previous example compiles, but afterwards it looks like this:

a ≤ b
a ≤ b
a is less than or equal to b
a is less than or equal to b
a is not greater than b
a is not greater than b
a does not come after b
a does not come after b

I call terms that are functionally equivalent to one another synonyms . I call terms that are replaced by other terms on decompilation abbreviations .

Code in this book is compiled before being pasted into the page, so you won't see any abbreviations in the book's code examples (except, as here, with the explicit purpose of displaying an abbreviation). In fact, this book does not even list abbreviations, except where I find them particularly handy when typing code. For example, in real life I never type the word application because I know the abbreviation app will do; so I tell you about this abbreviation ("Application" ...

Get AppleScript: The Definitive Guide, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.