This program tests the any and all instructions with floating point and integer numbers.
Program
---
Any and All Numbers Test Program
---
prog_vars =
d/pin1 0
d/pin2 1
d/float1 12.5
d/float2 3.141
d/int1 10
d/int2 0
d/pin_no 0
d/text1 "Jack"
d/text2 "Jill"
prog_vars.
prog_start =
print " -------------- "
print "all statement test program"
prog_start.
prog_loop =
-- Test 1 Should be TRUE ie /pin_no != 1
/pin1 0
/pin2 1
/pin_no 2
all /pin_no != 1 ->
print "Test 1 TRUE CORRECT"
else
print "Test 1 FALSE WRONG"
exitprog
enda.
-- Test 2 Should be FALSE ie /text1 not = to /text2
all /text1 = /text2 ->
print "Test 2 TRUE WRONG"
else
print "Test 2 FALSE CORRECT"
exitprog
enda.
-- Test 3 Should be TRUE ie /text1 is != /text2
all /text1 != /text2 ->
print "Test 3 TRUE CORRECT"
else
print "Test 3 FALSE WRONG"
exitprog
enda.
-- Test 4 Should be TRUE ie /text1 is "JacK"
all /text1 = "Jack" ->
print "Test 4 TRUE CORRECT"
else
print "Test 3 FALSE WRONG"
exitprog
enda.
-- Test 5 Should be TRUE ie /float1 = 12.5
all /float1 = 12.5 ->
print "Test 5 TRUE CORRECT"
else
print "Test 5 FALSE WRONG"
exitprog
enda.
-- Test 6 Should be TRUE ie /float1 > /float2
all /float1 > /float2 ->
print "Test 6 TRUE CORRECT"
else
print "Test 6 FALSE WRONG"
exitprog
enda.
prog_loop.
prog_stop =
print "Bye"
prog_stop.