next up previous

12.2.3 Finding an Element

The member$†function will tell if a single field value is contained in a multifield value.

Syntax

(member$ <single-field-expression> <multifield-expression>)

If the first argument is one of the fields within the second argument, member$ will return the integer position of the field (from 1 to the length of the second argument). Otherwise, it will return FALSE.

Example

CLIPS> (member$ blue (create$ red 3 "text" 8.7 blue))
5
CLIPS> (member$ 4 (create$ red 3 "text" 8.7 blue))
FALSE
CLIPS>


next up previous