The table below shows the order of precedence of operators in HyperTalk. In a complex expression containing more than one operator, the operations indicated by operators with lower-numbered precedence will be performed before those with higher-numbered precedence. Operators of equal precedence are evaluated left-to-right, except for exponentiation, which goes right-to-left. If you use parentheses, the innermost parenthetical expression is evaluated first.
Order | Operators | Type of Operator |
---|---|---|
1 - Unary & Conditional | not | Negation for boolean values |
there is a | Boolean test for existence | |
there is an | Boolean test for existence | |
there is not a | Boolean test for existence | |
there is not an | Boolean test for existence | |
− | Negation for numbers | |
2 - Exponentiation | ^ | Exponentiation for numbers |
3 - Multiplication | div | Division for numbers |
mod | Modulus for numbers | |
* | Multiplication for numbers | |
/ | Division for numbers | |
4 - Addition | + | Addition for numbers |
- | Subtraction for numbers | |
5 - String Concatenation | & | Concatenation for strings |
&& | Concatenation for strings | |
6 - Relational | contains | Comparison for strings |
is in | Comparison for strings | |
is not in | Comparison for strings | |
is not of | Comparison for strings | |
is not within | Boolean test for point within rectangle | |
is of | Comparison for strings | |
is within | Boolean test for point within rectangle | |
< | Comparison for numbers or strings | |
<= | Comparison for numbers or strings | |
> | Comparison for numbers or strings | |
>= | Comparison for numbers or strings | |
≤ | Comparison for numbers or strings | |
≥ | Comparison for numbers or strings | |
7 - Polymorphic | is a | Comparison for types |
is an | Comparison for types | |
is not a | Comparison for types | |
is not an | Comparison for types | |
8 - Equivalence | is | Comparison for numbers or strings |
is not | Comparison for numbers or strings | |
<> | Comparison for numbers or strings | |
= | Comparison for numbers or strings | |
≠ | Comparison for numbers or strings | |
9 - Boolean AND | and | Logical AND for boolean values |
10 - Boolean OR | or | Logical OR for boolean values |