;;; This is a program to show off all of SLISP wizzy demos. (defvar demos-loaded? nil "T if demo files have already been loaded.") ;;; The list of names of demos to load. Add here if there are more demos. (defparameter demo-files '("bball" "hanoi" "qix" "petal" "wow" "woops") "The list of demo program names.") (defparameter demo-home-directory ">lisp3>user>daa>demos>" "Where the demos live.") ;;; LOAD-DEMOS is the function to call to load up all of the various demo programs. (defun load-demos () "Load demo programs if they have not already been loaded." (cond ((null demos-loaded?) (dolist (file demo-files) (princ "Loading ") (princ file) (load (concatenate 'simple-string demo-home-directory file ".sfasl")) (terpri)) (setq demos-loaded? t)))) ;;; The top level caller. If there are more demos added, add where indicated ;;; in the form ("" :funcall "" ()) ;;; If there are no args then leave off the last line. (defun demo () (menu-choose :items (("bball" :funcall #'bounce-boxes) ("hanoi" :funcall #'hannoi (6)) ("qix" :funcall #'qix) ;; add here. ("petal" :funcall #'petal) ("wow" :funcall #'wow) ("woops" :funcall #'woops)) :title "One of..")) (princ "Enter demos directory [>lisp3>user>daa>demos>]: ") (let ((dir (read-line))) (unless (equal "" dir) (setq demo-home-directory dir))) (load-demos)