NLI: Function: set1 & set+

Background: NLI, Expressions, Functions
Related: Examples

Description:
The set1 function creates a sequence. set1's last input must be a string. Before making the sequence, the last input is replaced the first attribute instance named by string. The set+ is similar to set1 except it creates the attribute instance, if none exists.

General Format:
(set1 entity attribute 'nameOfAttributeInstance)
(set+ entity attribute 'nameOfAttributeInstance)

Examples:
(set1 john gender 'male))
(set+ john gender 'male))

Notes:
(set1 john gender 'male)
is approximately equivalent to
(set john gender (and (get gender instance *) (get * name 'male))).

CM ©2000-2007