ChaosPro Home
Introduction
What's New
Palettes
Using Formulas
Layering in ChaosPro
Rendering
Fractal Parameter Windows
Windows
Menu
3D Transformations
Animations
Formula Compiler
Writing Formulas
Language Reference
Introduction
Basic Syntax
Datatypes
Constants
Variables
Expressions
Operators
Precedence
Arithmetic Operators
Assignment Operator
Comparison Operator
Logical Operators
Functions
Control Structures
Compiler Directives
Functions
Interface to ChaosPro
Special Features, Notes...
Compatibility
Fractal Type Reference
Tutorials
Appendix
CHAOSPRO 4.0
Release 4.0
.

Operator Precedence

The precedence of an operator specifies how "tightly" it binds two expressions together. For example, in the expression 1 + 5 * 3, the answer is 16 and not 18 because the multiplication ("*") operator has a higher precedence than the addition ("+") operator. Parentheses may be used to force precedence, if necessary. For instance: (1 + 5) * 3 evaluates to 18.

The following table lists the precedence of operators with the lowest-precedence operators listed first.

Associativity Operators
left  , 
left  = (assignment)
left  || (logical or) 
left  && (logical and)
non-associative   == (equal to) 
non-associative   != (not equal to) 
non-associative  < (lower than) 
non-associative  <= (lower or equal) 
non-associative  > (greater than) 
non-associative  >= (greater or equal) 
left  + (addition) 
left  - (subtraction) 
left  * (multiplication) 
left  / (division) 
left   % (modulo) 
left  ^ (power) 
right  ! (logical not) 
right  - (negation) 
right  [ (array dimension)