Next Previous Up Contents
Next: Strings and Quoting
Up: Algebraic Expression Syntax
Previous: Null Values

### 10.5 Operators

The operators are pretty much the same as in the C language. The common ones are:

Arithmetic
  `+` (add)
  `-` (subtract)
  `*` (multiply)
  `/` (divide)
  `%` (modulus)
Boolean
  `!` (not)
  `&&` (and)
  `||` (or)
  `^` (exclusive-or)
  `==` (numeric identity)
  `!=` (numeric non-identity)
  `<` (less than)
  `>` (greater than)
  `<=` (less than or equal)
  `>=` (greater than or equal)
Bitwise
  `&` (and)
  `|` (or)
  `^` (exclusive-or)
  `<<` (left shift)
  `>>` (right shift)
  `>>>` (logical right shift)
Numeric Typecasts
  `(byte)` (numeric -> signed byte)
  `(short)` (numeric -> 2-byte integer)
  `(int)` (numeric -> 4-byte integer)
  `(long)` (numeric -> 8-byte integer)
  `(float)` (numeric -> 4-type floating point)
  `(double)` (numeric -> 8-byte floating point)
  Note you may find the Maths conversion functions more convenient for numeric conversions than these.
Other
  `+` (string concatenation)
  `[]` (array dereferencing - first element is zero)
  `?:` (conditional switch)
  `instanceof` (class membership)

Next Previous Up Contents
Next: Strings and Quoting
Up: Algebraic Expression Syntax
Previous: Null Values

STILTS - Starlink Tables Infrastructure Library Tool Set
Starlink User Note256
STILTS web page: http://www.starlink.ac.uk/stilts/
Author email: m.b.taylor@bristol.ac.uk
Mailing list: topcat-user@jiscmail.ac.uk