Forked from
ESS EPICS Environment / wrappers / e3-require
1296 commits behind the upstream repository.
-
Jeong Han Lee authored
b3bc2ac2
Jeong Han Lee authoredb3bc2ac2
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
testscript 1.50 KiB
#var exprDebug 1
x=3, !3, -3, ~3, 3?
# $(x) should be: 3, 0, -3, -4, 1
x=10+3, 10-3, 10*3, 10/3, 10%3, 10**3
# $(x) should be: 13, 7, 30, 3, 1, 1000
x=%x -10<<2, %x -10>>2, %x -10>>>2
# $(x) should be: ffffffffffffffd8, fffffffffffffffd, 3ffffffffffffffd
x=%x 0xaa & 0x0f, %x 0xaa | 0x0f, %x 0xaa ^ 0x0f
# $(x) should be: a, af, a5
x=10<20 10<=20 10==20 10>=20 10>20 10<=>20
# $(x) should be: 1 1 0 0 0 -1
x=20<20 20<=20 20==20 20>=20 20>20 20<=>20
# $(x) should be: 0 1 1 1 0 0
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=1*2*3+4*5*6-7-8
# $(x) should be: 111
x=1*2*3+4*5*6-7*8
# $(x) should be: 70
x=-3**2+1, -(3**2)+1, (-3)**2+1, -3**-2+1, (1+2), (1+2, 1+2)
# $(x) should be: 10, -8, 10, 1, 3, (1+2, 3)
x=%#X 0x5555&0xfff0|0xaf<<8^0xa00a0>>4
# $(x) should be: 0X5F5A
x=7+4*2|32
# $(x) should be: 47
x=3<5 ? 7+4*2|32 : 9 & 10
# $(x) should be: 47
x=3>5 ? 7+4*2|32 : 9 & 10
# $(x) should be: 8
x=7 ?: -1
# $(x) should be: 7
x=0 ?: -1
# $(x) should be: -1
x=7 ? -1
# $(x) should be: -1
x=0 ? -1
# $(x) should be: 0
x=1+0?0?1:2:3?4:5
# $(x) should be: 2
x=1+0?7?1:2:3?4:5
# $(x) should be: 1
x=1+1?0?1:2:3-3?4:5
# $(x) should be: 2
x=1-1?0?1:2:3?4:5
# $(x) should be: 4
x=1-1?0?1:2:3-3?4:5
# $(x) should be: 5
x=0?; 1?; 2?; -4?
# $(x) should be: 0; 1; 1; 1
x=a030b a(030)b a( 030 )b "a"030"b" a(%x 030)b
# $(x) should be: a030b a24b a24b a24b a18b
x=-2**2 0-2**2 0+-2**2 0--2**2
# $(x) should be: 4 -4 4 -4