You can override the natural precedence of operators by using parentheses.
Binary and Arithmetic Operators
SEARCHScript provides the following set of arithmetic operators you can use in expressions.
Operator
|
Description
|
---|---|
+
|
Unary or Addition operator. This operator can be used for numbers and strings.
|
-
|
Subtraction.
|
*
|
Multiplication.
|
/
|
Division.
|
%
|
Modulus (remainder).
|
The precedence of the Addition (+) and Subtraction (-) operators is lower than *, / and % which is in turn lower than unary operators + and -. Associativity is left to right for all operators used in expressions.
Relational Operators
SEARCHScript provides the following set of relational operators you can use in creating expressions. Relational operators can be used with all data types. String comparisons are case-insensitive. For case-sensitive comparisons, use the StrComp() function.
Relational operators have lower precedence than either bitwise or arithmetic operators.
Boolean Operators
SEARCHScript provides the following set of Boolean operators you can use in creating expressions.
Operator
|
Description
|
---|---|
NOT
|
Logical NOT operator.
|
AND
|
Logical AND operator.
|
OR
|
Logical OR operator.
|
- <% If IsEmpty(Title) AND IsEmpty(URL) Then %>
- <% Print ("No title!") %>
- <% Endif %>