ObjectScript Operators
- Unary Positive (+) – Gives its single operand a numeric interpretation.
- Unary Negative (-) – Reverses the sign of its operand, after interpreting the operand as a number.
- Addition (+) – Produces the numeric sum of two operands, after interpreting them as numbers.
- Subtraction (-) – Produces the numeric difference between two operands, after interpreting them as numbers.
- Multiplication (*) – Multiplies two operands, after interpreting both operands as numbers.
- Division (/) – Divides two numerically operands, after interpreting both operands as numbers.
- Integer Division ( \ ) – Produces the integer result of the division of the operands, after interpreting both operands as numbers.
- Modulo (#) – Produces the value of an arithmetic modulo operation on two operands, after interpreting both operands as numbers.
- Exponentiation (**) – Produces the exponentiated value of the operands, after interpreting both operands as numbers.
- Less Than (<) – Tests whether the left operand is less than the right operand, after interpreting both operands as numbers.
- Greater Than (>) – Tests whether the left operand is numerically greater than the right operand, after interpreting both operands as numbers.
- Less Than or Equal To (<= or '>) – Tests if the left operand is less than or equal to the right operand, after interpreting both operands as numbers.
- Greater Than or Equal To (>= or '<) – Tests if the left operand is greater than or equal to the right operand, after interpreting both operands as numbers.
- Not (') – Inverts the truth value of the boolean operand.
- And (& or &&) – Tests whether both its operands have a truth value of TRUE (1).
- Or (! or ||) – Tests if either or both operands have a value of TRUE.
- Not And (NAND) ('&) – Reverses the truth value of the & And applied to both operands.
- Not Or (NOR) ('!) – Tests if both operands have values of FALSE.
- String Concatenate (_) – Concatenates its two operands, after interpreting them as strings.
- Equals (=) – Tests two operands for string equality.
- Not Equals ('=) – Reverses the truth value of the Equals operator applied to both operands.
- Contains ([) – Tests whether the sequence of characters in the right operand is a substring of the left operand.
- Does Not Contain ('[) – Returns TRUE if operand A does not contain the character string represented by operand B and FALSE if operand A does contain the character string represented by operand B.
- Follows (]) – Tests whether the characters in the left operand come after the characters in the right operand in ASCII collating sequence.
- Not Follows (']) – Tests if the left operand does not follow the right operand in ASCII collating sequence.
- Sorts After (]]) – Tests whether the left operand sorts after the right operand in numeric subscript collation sequence.
- Not Sorts After (']]) – Tests whether the left operand does not sort after the right operand.
- Pattern Match (?) – Tests if a given string matches a given pattern.
- Indirection (@) – Enables you to include the syntax of a name, a pattern, a command argument, an array node, or a $TEXT argument indirectly through the value of an indirection operand.