[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sfa error checking



    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)))))