; Test setup courtesy of W E B. ; Everything following a semi-colon is a comment. ; This comment extends to the end of the line. (expand 8) ; Make some set constants to use as test data. (setq a '(a b c d e f g)) (setq b '(d f b a h q r s)) (setq empty nil) (setq c '(tom dick mary)) (setq d '(dick mary jane)) (setq f1 (openo "handin.out")) ; output file now open. Write test results ; Don't do anything to change f1. It belongs to the I/O system now. ; The labeling of output could be improved. I leave that to each user. (print "Reba Orton" f1) ; Change the string to your name. (print "Data" f1) (print a f1) (print b f1) (print " " f1) (print "Unions" f1) (print (setunion a b) f1) (print (setunion empty a) f1) (print (setunion b empty) f1) (print (setunion empty empty) f1) (print " " f1) (print "Intersections" f1) (print (setintersect a b) f1) (print (setintersect a a) f1) (print (setintersect a nil) f1) (print (setintersect nil a) f1) (print " " f1) (print "Using setdiff" f1) (print (setdiff a b) f1) (print (setdiff b a) f1) (print " " f1) (print "Setequal" f1) (print (setequal a b) f1) (print (setequal a a) f1) (print (setequal empty empty) f1) (print " " f1) (print "More data." f1) (print c f1) (print d f1) (print " " f1) (print "setunion" f1) (print (setunion c d) f1) (print " " f1) (print "setintersect" f1) (print (setintersect c d) f1) (print " " f1) (print "setdiff" f1) (print (setdiff c d) f1) (print " " f1) (print "End of processing" f1) ; Processing of test cases is completed; close the file. (close f1) ; Don't use f1 after this. ; Leave Xlisp. (print "Exiting xlisp.") ; This comes to the screen. (exit)