From 7756972d3602cb20cf96d804005fe2ce83de36fd Mon Sep 17 00:00:00 2001 From: Blake Madden Date: Sun, 25 Feb 2024 10:56:03 -0500 Subject: [PATCH] Add more docs for operator precedence, doc == operator --- docs/manual/operators.qmd | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/manual/operators.qmd b/docs/manual/operators.qmd index 476e934..5a6e40a 100644 --- a/docs/manual/operators.qmd +++ b/docs/manual/operators.qmd @@ -12,13 +12,14 @@ The following operators\index{operators} are supported within math expressions: | \- | Subtraction. | | ^ | Exponentiation. The number in front of ^ is the base, the number after it is the power to raise it to. | | ** | Exponentiation. (This is an alias for ^) | -| \= | Equals. | | < | Less than. | | \> | Greater than. | -| <> | Not equal to. | -| \!= | Not equal to. (This is an alias for <>) | | \>= | Greater than or equal to. | | <= | Less than or equal to. | +| \= | Equals. | +| \=\= | Equals. (This is an alias for \=) | +| <> | Not equal to. | +| \!\= | Not equal to. (This is an alias for <>) | | & | Logical conjunction (AND). | | && | Logical conjunction (AND). | | \| | Logical alternative (OR). | @@ -36,9 +37,15 @@ For operators, the order of precedence is: | Operator | Description | | :-- | :-- | | ( ) | Instructions in parentheses are executed first. | +| \+ and - | Positive or negative sign for a value. | | ^ | Exponentiation. | | \*, /, and % | Multiplication, division, and modulus. | | \+ and - | Addition and subtraction. | +| << and >> | Bitwise left and right shift. | +| <, \>, \>=, <= | Relational comparisons. | +| \= and \!\= | Equality comparisons. | +| && | Logical conjunction (AND). | +| \|\| | Logical alternative (OR). | ::: For example, the following: