;;; -*- Mode:LISP; -*- (herald IO) (declare (*lexpr gprint program-record)) ;;; File hacking if on TOPS-20 (eval-when (eval compile load) (cond ((status feature TOPS-20) (putprop 'studnt '(ps kmp/.teach) 'ppn) (putprop 'teach '(ps kmp/.teach) 'ppn)))) ;;; Macro support (eval-when (eval compile) (load '((teach) macro))) (defun string-length (x) (flatc x)) (defun char-n (x n) (getcharn x (1+ n))) (defun diagnose (&rest stuff) (lexpr-funcall #'format t stuff)) (defun bug (&rest stuff) (program-record "~&Bug in TEACH: ~A" (lexpr-funcall #'format nil stuff)) (error (format nil "~&Bug in TEACH: ~A" (lexpr-funcall #'format nil stuff)))) (defun quiet-bug (&rest stuff) (program-record "~&Bug in TEACH: ~A" (lexpr-funcall #'format nil stuff))) (defun output (&rest stuff) (lexpr-funcall #'format t stuff)) (defun query (string &rest stuff) (format t "~2&") (y-or-n-p (lexpr-funcall #'format nil string stuff))) (defun clear-screen () (format t "~/|")) (defun fresh-line (&optional number) (format t "~&") (if number (do ((n number (1- n))) ((= n 0)) (format t "~%")))) (defun sysread (&rest stuff) ;rethink this sometime (with-saved-obarray (lexpr-funcall #'read stuff))) (defun defined-function? (name) (getl name '(expr fexpr macro subr fsubr lsubr))) ;;; Local Modes:; ;;; Mode:LISP; ;;; Comment Column:50; ;;; End:;