SQLite Forum

operator precedence docs missing, suggested clarifications below
Login
I looked at section 2 again among the unary operators but it doesn't say what the relative precedence of NOT is.  I don't think it even says where unary -, +, and ~ go.  It's easy to see in the grammar of course. When I wanted to know I just tried experiments until I found the spot.  The ~ operator was the only question mark for me. It could have been down near the binary operators rather that up with negation.

e.g.

```
  ~1<<7
```

could have meant

```
  ~(1<<7)
```

I can't find where ~ is compared to any of the binary operators.

But NOT and ~ are a long way apart in precedence.