next up previous

12.16.1.22 Getting the Allowed Values for a Slot

This function groups the allowed values for a slot (specified in any of allowed… facets for the slots) into a multifield variable. If no allowed… facets were specified for the slot, then the symbol FALSE is returned. A multifield of length zero is returned if an error occurs.

Syntax

(slot-allowed-values <class-name> <slot-name>)

Example

CLIPS> (clear)
CLIPS>
(defclass A (is-a USER)
  (slot x)
  (slot y (allowed-integers 2 3) (allowed-symbols foo)))
CLIPS> (slot-allowed-values A x)
FALSE
CLIPS> (slot-allowed-values A y)
(2 3 foo)
CLIPS>


next up previous