Operators

Prev Next

Overview

Operators are symbols which represent an action or process and are basic elements in arithmetics. B4P distinguishes between following semantic operator types:

  • Unary operators are simple operators added in front of a value or expression, e.g. a minus sign for negation, logical NOT, etc.
  • Binary operators are operators between two expressions, e.g. to describe additions, multiplications, etc.
  • Assignment operators allow a simplified formulation such as a[] -= b[]; which is equivalent to a[] = a[] - b[];
  • Ad-hoc operators can be applied on LHS expressions able to reference to tables and variables. Example: a[]++; is equivalent to a[] = a[] + 1;

In a different dimension, B4P distinguishes between follwoing algorithmic operator types applicable to both binary operators and assignment operators:

See also

Unary operators
Binary operators
Assignment operators
Ad-hoc operators
Arithmetic operators
Logical operators
Comparison operators