| precedence |
|---|
Operator precedence specifies which operations are done first (for example, multiply before add). The # operator is the "length" operator which can be applied to things like strings and tables (eg. #"nick" is 4). All binary operators are left-associative, except for "^" (exponentiation) and ".." (concatenation) which are right-associative. What this means is that for left-associative operators at the same level (eg. + and -) they are grouped from left to right. Thus: is the same as: So for example: However for concatenation: is the same as: And for exponentiation: is the same as: For example: See Also ... Lua keywords/topics
Topics
(Help topic: lua=precedence) |
Enter a search string to find matching documentation.
Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.