next up previous

12.2.2 Specifying an Element

The nth$ function will return a specified field from a multifield value.

Syntax

    (nth$ <integer-expression> <multifield-expression>)

where the first argument should be an integer from 1 to the number of elements within the second argument. The symbol nil will be returned if the first argument is greater than the number of fields in the second argument.

Example

CLIPS> (nth$ 3 (create$ a b c d e f g))
c
CLIPS>


next up previous