An operation uses an operator to derive a value. AppleScript defines many constants that you can use as operators. Following are some of the operators you can use.
Boolean operators:
These operators result in a true or false value.
|
|
|
|
|
|
|
Type |
|
Constant |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Binary logical |
|
and
or |
|
|
|
|
Not (unary operator) |
|
not |
|
|
|
|
Equals |
|
=
is
equals
is equal to |
|
|
|
|
Not equal |
|
is not
is not equal to |
|
|
|
|
Greater than |
|
>
[is] greater than
comes after |
|
|
|
|
Less than |
|
<
[is] less than
comes before |
|
|
|
|
Greater than or equal to |
|
>=
is greater than or equal to
does not come before |
|
|
|
|
Less than or equal to |
|
<=
is less than or equal to
does not come after |
|
|
|
|
Starts with |
|
starts with
begins with |
|
|
|
|
Ends with |
|
ends with |
|
|
|
|
Contains |
|
contains |
|
|
|
|
Does not contain |
|
does not contain |
|
|
|
|
Is contained by |
|
is in
is contained by |
|
|
|
|
Is not contained by |
|
is not in
is not contained by |
|
|
|
Miscellaneous operators:
|
|
|
|
|
|
|
Type |
|
Constant |
|
Description |
|
|
|
|
|
|
|
|
|
|
|
|
|
Concatenation |
|
& |
|
Joins values. Results in a List, Record, or String. |
|
|
Coercion |
|
as |
|
Converts a value to another class. |
|
|
A Reference To |
|
a reference to |
|
Assigns a reference to an object as the value of a variable. |
|
Mathematical operators:
Use these operators with integers, real numbers, and dates.
|
|
|
|
|
|
|
Type |
|
Constant |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Addition |
|
+ |
|
|
|
|
Subtraction |
|
- |
|
|
|
|
Division |
|
÷
/ |
|
|
|
|
Integral division |
|
div |
|
|
|
|
Remainder |
|
mod |
|
|
|
|
Exponent |
|
^ |
|
|
|