summaryrefslogtreecommitdiffstats
path: root/test/04-function-iseven.txt
diff options
context:
space:
mode:
Diffstat (limited to 'test/04-function-iseven.txt')
-rw-r--r--test/04-function-iseven.txt40
1 files changed, 40 insertions, 0 deletions
diff --git a/test/04-function-iseven.txt b/test/04-function-iseven.txt
new file mode 100644
index 0000000..aa224e2
--- /dev/null
+++ b/test/04-function-iseven.txt
@@ -0,0 +1,40 @@
+%% Test for ISEVEN and ISODD functions.
+%mode init
+A2=10.2
+A3=11.4
+B2=ISEVEN(2)
+B3=ISEVEN(3)
+B4=ISEVEN(1.2)
+B5=ISEVEN(4.2)
+B6=ISEVEN(4.9)
+B7=ISEVEN(-4.9)
+B8=ISEVEN(A2)
+B9=ISEVEN(A3)
+C2=ISODD(2)
+C3=ISODD(3)
+C4=ISODD(1.2)
+C5=ISODD(4.2)
+C6=ISODD(4.9)
+C7=ISODD(-4.9)
+C8=ISODD(A2)
+C9=ISODD(A3)
+%calc
+%mode result
+B2=true
+B3=false
+B4=false
+B5=true
+B6=true
+B7=true
+B8=true
+B9=false
+C2=false
+C3=true
+C4=true
+C5=false
+C6=false
+C7=false
+C8=false
+C9=true
+%check
+%exit