() | |||||||
Type | operator | ||||||
Dictionary | LCS | ||||||
Library | LiveCode Script | ||||||
Syntax |
| ||||||
Summary | |||||||
Introduced | 1.0 | ||||||
OS | mac, windows, linux, ios, android | ||||||
Platforms | desktop, server, mobile | ||||||
Parameters |
| ||||||
Example |
| ||||||
Related | Keyword: [] Operator: +, -, *, / Function: value, sin Glossary: matched, operand, operation, operator, group, expression, control structure, evaluate, compile error Control Structure: function | ||||||
Description | Use parentheses ( ) to group operands together in order to control the order operations are performed in, or to make the structure of a complex expression clearer. When LiveCode evaluates an expression, operations enclosed within parentheses are performed first. If parentheses are nested, the expression within the innermost set of parentheses is evaluated first. For example, the sin function is evaluated before the /
operator, so Even when they are not needed to change operator precedence, parentheses are useful in making complex expressions more readable. For example,
evaluates to the same number as
But the first example is easier to understand, because the parentheses break down the expression logically for the reader. Parentheses in expressions must be used in pairs, each ( with a matching ). Use of unmatched parentheses will cause a compile error. | ||||||
Tags | math |