top of page

All Statement Test Example

This is an example program showing how to use all statements.

Program


---

all Statement Test Program no 1

This is an example program showing how to use all statements.

---

prog_vars =

d/pin1 0

d/pin2 1


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.


prog_loop.


prog_stop =

print "Bye"

prog_stop.




bottom of page