pcosmos.ca

le domaine de Philippe Choquette

Accueil Profil Contact Arrière plan
Half-Life
Diseases
PCASTL
Operators
Data Types
Internal Functions
Tree Structure
Batch Execution
Examples
Interpreter Informatique
OpenGL
Grow
Elements
Lecture
Liens

PCASTL Operators

Page en français

Precedence Operator Description Associativity
Highest 12 -> Dereference operator. left
11 postfix ++ Postfix increment. left
postfix -- Postfix decrement.
10 prefix ++ Prefix increment. right
prefix -- Prefix decrement.
unary - Negation operator.
! Logical NOT.
& Reference operator.
unary * Indirection operator. Can be applied to a variable holding a pointer.
9 casts Cast operator. right
8 ^ Exponentiation operator. right
7 binary * Multiplication operator. left
/ Division operator.
6 + Addition operator. left
binary - Subtraction operator.
5 <= Relational operator "less than or equal". left
< Relational operator "less than".
>= Relational operator "greater than or equal".
> Relational operator "greater than".
4 != Relational operator "not equal". Can be used to compare strings. left
== Relational operator of equality. Can be used to compare strings.
3 && Logical AND. left
2 || Logical OR. left
Lowest 1 = Assignment operator. right

Operator with highest precedence are evaluated first.

back to PCASTL