DOCS

# Parenthesis

Parenthesis are used to change the normal order of expression evaluation. There are two parenthesis: the left parenthesis ‘(’ and the right parenthesis ‘)'. The number of left and right parenthesis used within an expression must always be equal.

When would you use parenthesis? Take the expression “3 * 4 + 2” as an example. This expression contains no parenthesis, it first multiplies 3 by 4, and then adds 2. If parenthesis where added to the expression it would be equivalent to “(3 * 4) + 2”. Parenthesis would be used if you needed the 4 and 2 to be added together before multiplying by 3. You would simply surround the “4 + 2” with left and right parenthesis resulting in the following expression: “3 * ( 4 + 2 )".