Operators
This page lists all the operators available in the language for use to process data. With except to the assignment operator, all of them operate on the scalar values (strings, numbers).
In order to allow for table/matrix operations, looping must be employed to iterate over all keys of the table and processing it’s values one by one.
ASTER does not provide an inequality operator (similar to <>
or !=
known from other approaches). This is a conscious design decision coming from how the language interpreter operates internally.
To compare for inequality, please use the NOT
operator and relevant value equality operator ==
or $==
. E.g. to check that variable A
does not equal to string “ABC”
write NOT(A $== 'ABC')
Operator | Role | Example |
---|---|---|
| List collecting operator |
|
| Operation separator |
|
| Assignment done by value copy |
|
| Numeric addition in-place |
|
| Numeric subtraction in-place |
|
| Numeric multiplication in-place |
|
| Numeric division in-place |
|
| Numeric modulo (reminder) in-place |
|
| String concatenation in-place |
|
| Numeric addition |
|
| Numeric subtraction |
|
| Numeric multiplication |
|
| Numeric division |
|
| Numeric modulo (reminder) |
|
| Grouping, function parameters |
|
| Table / List indexing operator |
|
| Alternative indexing operator |
|
| Dynamic symbol name operator |
|
| Inline processing operator Allows to mixin expressions within strings avoiding the sometimes superfluous usage of string concatenation operator Use the string escape character |
|
| Logical AND |
|
| Logical OR |
|
| Logical negation |
|
| Short circuiting AND |
|
| Short circuiting OR |
|
| Logical AND negated |
|
| Logical OR negated |
|
| Logical Exclusive OR |
|
| Deep comparison of two values - compares values, lists, lists of list and so on for functional equality. |
|
| Check if element is contained in list, using deep comparison. |
|
| Numeric equality |
|
| Numeric greater or equal |
|
| Numeric greater |
|
| Numeric less |
|
| Numeric less or equal |
|
| String concatenation |
|
| String equal |
|
| String greater or equal |
|
| String greater |
|
| String less |
|
| String less or equal |
|