fix problem with other operator after '?'

This commit is contained in:
2018-05-02 14:32:58 +02:00
parent 4e30b97c99
commit f4f01fc684
2 changed files with 74 additions and 59 deletions
+5 -2
View File
@@ -9,6 +9,9 @@ x=x, !x, !!x, -x, --x, ~x, ~~x, x?, x??
x=10+3, 10-3, 10*3, 10/3, 10%3, 10**3
# $(x) should be: 13, 7, 30, 3, 1, 1000
x=7**-2 7**-1 7**0 7**1 7**2 7**3 7**4 7**5 7**6
# $(x) should be: 0 0 1 7 49 343 2401 16807 117649
x=%x -10<<2, %x -10>>2, %x -10>>>2
# $(x) should be: ffffffffffffffd8, fffffffffffffffd, 3ffffffffffffffd
@@ -24,8 +27,8 @@ x=20<20 20<=20 20==20 20>=20 20>20 20<=>20
x=20<10 20<=10 20==10 20>=10 20>10 20<=>10
# $(x) should be: 0 0 0 1 1 1
x= (0|0)(0|1)(1|0)(1|1) (0&0)(0&1)(1&0)(1&1)
# $(x) should be: 0111 0001
x= (0|0)(0|1)(1|0)(1|1) (0&0)(0&1)(1&0)(1&1) (0^0)(0^1)(1^0)(1^1)
# $(x) should be: 0111 0001 0110
x=1*2*3+4*5*6-7-8
# $(x) should be: 111