[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
sfa error checking
- To: GZ at MIT-MC
- Subject: sfa error checking
- From: Kent M. Pitman <KMP at MIT-MC>
- Date: Tue, 27 Jan 81 10:26:00 GMT
- Cc: BUG-LISP at MIT-MC
- Original-date: 27 January 1981 05:26-EST
Date: 20 December 1980 08:48-EST
From: Gail Zacharias <GZ>
Re: sfa error checking
Consider the following session:
(defun nothin N '())
NOTHIN
(setq test (sfa-create #'nothin 17. 'testing))
=> #SFA-|TESTING|-70766
(open test) => NIL
(close test) => NIL
(deletef test) => NIL
(filepos test 13.) => NIL
(sfa-call test #'untyi ()) => NIL
(tyo 3 test) => T
(out test 2) => NIL
(force-output test) => NIL
(prin1 1 test) => T
(princ 'a test) => T
(print 'foo test) => T
(cursorpos test) => NIL
(in test) => ;NIL NON-FIXNUM VALUE
;; Well, at least this one errs out
Do I have to define all these operations just to have them err out?
TYI is the only one that actually complains that it is not supported.
-----
Yes. For the time being at least, a common way of handling this problem
is:
(DEFUN NOTHING (SELF OP DATA)
(CASEQ OP
((WHICH-OPERATIONS) '(TYO CLOSE))
((TYO) ...code...)
(T
(ERROR "Unsupported SFA Operation"
(LIST 'SFA-CALL SELF OP DATA)))))