forked from epics_driver_modules/require
add string slices
This commit is contained in:
+6
-7
@@ -1,7 +1,10 @@
|
||||
#var exprDebug 1
|
||||
|
||||
x=3, !3, -3, ~3, 3?
|
||||
# $(x) should be: 3, 0, -3, -4, 1
|
||||
x=3, !3, !!3, -3, --3, ~3, ~~3, 3?, 3??
|
||||
# $(x) should be: 3, 0, 1, -3, 3, -4, 3, 1, 1
|
||||
|
||||
x=x, !x, !!x, -x, --x, ~x, ~~x, x?, x??
|
||||
# $(x) should be: 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
|
||||
@@ -57,13 +60,10 @@ x=7 ? -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=1+0?0?1:2:3?4:5
|
||||
# $(x) should be: 2
|
||||
|
||||
x=1-1?0?1:2:3?4:5
|
||||
@@ -90,4 +90,3 @@ x=-2**2 0-2**2 0+-2**2 0--2**2
|
||||
x=
|
||||
y=$(x)
|
||||
# <$(x)><$(y)> should be: <><>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user