mirror of
https://github.com/zaphar/ucg.git
synced 2025-07-22 18:19:54 -04:00
DOCS: Add the not operator to our expression reference.
This commit is contained in:
parent
619e3d8d2e
commit
39f7afa8fc
@ -146,14 +146,22 @@ let lst = [1, "two", {three = 3}];
|
||||
|
||||
### Boolean Operators
|
||||
|
||||
UCG has the standard boolean operators: `&&` and `||`. Both of them short circuit and they require the expressions on each
|
||||
side to be boolean.
|
||||
UCG has the standard boolean operators: `&&` and `||`. Both of them short
|
||||
circuit and they require the expressions on each side to be boolean.
|
||||
|
||||
```
|
||||
true && false == false;
|
||||
false || true == true;
|
||||
```
|
||||
|
||||
In addition to the binary operators `&&` and `||` UCG also has the unary
|
||||
operator `not` which reverses a boolean value.
|
||||
|
||||
```
|
||||
not true == false;
|
||||
not false == true;
|
||||
```
|
||||
|
||||
#### Operator Precedence
|
||||
|
||||
UCG binary operators follow the typical operator precedence for math. `*` and
|
||||
|
Loading…
x
Reference in New Issue
Block a user