blob: 4728b2e68b73751ffd7061fdf4664b69ca78d26f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
# Test operator precedence:
assert 3+5*5-2 == 28- -26-28
proc `^-` (x, y: int): int =
# now right-associative!
result = x - y
assert 34 ^- 6 ^- 2 == 30
assert 34 - 6 - 2 == 26
echo "done"
|