Parenthesis are used for grouping expressions. Expression grouping is useful when multiple expressions are strung together in a line and the normal order of operations must be overridden.
The CueScript, operators are always interpreted from left to right. Parenthesis can be inserted into a command string to force different groupings of expressions to be evaluated in a different order.
The following examples illustrate how to use parenthesis to get different results. For these examples, assume x = 3 and y = 7.
| Expression | Result |
|---|---|
| 4 + 2 * 3 | 18 |
| 4 + (2 * 3) | 10 |
| Channel ‘x’ + ‘y’ | Selects channel 3 and channel 7 |
| Channel (‘x’ + ‘y’) | Selects channel 10 |

