Language Guide

CHAPTER 6
Expressions
Operations 167
- Minus. Binary or unary arithmetic operator. The binary
operator subtracts the number to its right from the
number or date to its left. The unary operator makes
the number to its right negative. Only integers can be
subtracted from dates. AppleScript interprets such an
integer as a number of seconds.
Class of operands: Date, Integer, Real
Class of result: Date, Integer, Real
(Option-slash)
/
Division. Binary arithmetic operator that divides the
number to its left by the number to its right.
Class of operands: Integer, Real
Class of result: Real
div Integral division. Binary arithmetic operator that divides
the number to its left by the number to its right and
returns the integral part of the answer as its result.
Class of operands: Integer, Real
Class of result: Integer
mod Remainder. Binary arithmetic operator that divides the
number to its left by the number to its right and returns
the remainder as its result.
Class of operands: Integer, Real
Class of result: Integer, Real
^ Exponent. Binary arithmetic operator that raises the
number to its left to the power of the number to its right.
Class of operands: Integer, Real
Class of result: Real
as Coercion. Binary operator that converts the operand to
its left to the class listed to its right. Not all values can
be coerced to all classes. The coercions that AppleScript
can perform are listed in “Coercing Values” on page 68.
The additional coercions, if any, that applications can
perform are listed in application dictionaries.
Class of operands: the operand to the right of the operator
must be a class identifier; the operand to the left must be
a value that can be converted to that class
Class of result: the class specified by the class identifier to
the right of the operator
continued
Table 6-1 AppleScript operators (continued)
Operator Description