mirror of
https://github.com/zaphar/ucg.git
synced 2025-07-23 18:29:50 -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
|
### Boolean Operators
|
||||||
|
|
||||||
UCG has the standard boolean operators: `&&` and `||`. Both of them short circuit and they require the expressions on each
|
UCG has the standard boolean operators: `&&` and `||`. Both of them short
|
||||||
side to be boolean.
|
circuit and they require the expressions on each side to be boolean.
|
||||||
|
|
||||||
```
|
```
|
||||||
true && false == false;
|
true && false == false;
|
||||||
false || true == true;
|
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
|
#### Operator Precedence
|
||||||
|
|
||||||
UCG binary operators follow the typical operator precedence for math. `*` and
|
UCG binary operators follow the typical operator precedence for math. `*` and
|
||||||
|
Loading…
x
Reference in New Issue
Block a user