Language Guide
CHAPTER 6
Expressions
170 Operations
REAL
Two real numbers are equal if they both represent the same real number, even
if the formats in which they are expressed are different. For example, the
following expression is true.
0.01 is equal to 1e10-2
Two real numbers are not equal if they represent different real numbers.
RECORDS
Two records are equal if they both contain the same collection of properties and
if the values of properties with the same labels are equal. They are not equal if
the records contain different collections of properties, or if the values of
properties with the same labels are not equal. The order in which properties are
listed does not affect equality. For example, the following expression is true.
{ name:"Eric", mileage:"8000" } = { mileage:"8000",
name:"Eric"}
REFERENCE
Two references are equal if their classes, reference forms, and containers are
identical. They are not equal if their classes, reference forms, and containers are
not identical, even if they refer to the same object.
For example, the expression x = y in the following Tell statement is true,
because the classes (word), reference forms (Index), and containers
(paragraph 1 of document "Intro" of application
"Scriptable Text Editor") of the two references are identical.
tell document "Intro" of application
"Scriptable Text Editor"
set x to a reference to word 1 of paragraph 1
set y to a reference to word 1 of paragraph 1
x = y
end tell
--result:true