From 6640dd203160882d603ce58b8305c146d67259ea Mon Sep 17 00:00:00 2001 From: David Peter Date: Mon, 4 Dec 2023 12:29:35 +0100 Subject: [PATCH] Add logical ops to operator precedence table --- book/src/operations.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/book/src/operations.md b/book/src/operations.md index a070b363..255dc6fc 100644 --- a/book/src/operations.md +++ b/book/src/operations.md @@ -15,6 +15,9 @@ Numbat operators and other language constructs, ordered by precedence form *high | subtraction | `x - y` | | addition | `x + y` | | comparisons | `x < y`, `x <= y`, `x ≤ y`, … `x == y`, `x != y` | +| logical negation | `!x` | +| logical 'and' | `x && y` | +| logical 'or' | `x || y` | | unit conversion | `x -> y`, `x → y`, `x ➞ y`, `x to y` | | conditionals | `if x then y else z` | | reverse function call | `x // f` |