;;KLOS
;; slot-exists-p
;; (slot-exists-p instance slot)
;; (slot-exists-p class slot)
;; Returns True if the slot is a slot of the instance or of the class.

;;AUTOLOAD: slot-exists-p

(defun slot-exists-p (object slot)
  (if (and (typep object ExObject) (typep slot Atom))
    (progn
      (if (not (typep object ExClass))
	(setq object (class-of object))
      )
      (if (getn (class-slots object) slot)
	t
))))

;; (slot-value-p object slot)
;; returns t if slot exist, nil otherwise in object

;;AUTOLOAD: slot-value-p

(defun slot-value-p (obj slot) (/= :nil (get obj slot :nil)))
