XLISP symbol-plist

Nyquist / XLISP 2.0 - Contents | Tutorials | Examples | Reference

# symbol-plist

Type: | - | function (subr)
Source: | - | xlbfun.c

## Syntax

(symbol-plist symbol)
  symbol - the symbol name with a property list
  returns - the symbol's property list

## Description

The 'symbol-plist' function returns the actual property list from the 'symbol'. The 'symbol' must be an existing, bound variable, but it does not need to have anything in it's property list.

Property lists are lists attached to any user defined variables. The lists are in the form of:

    (name1 val1 name2 val2 ....)

Any number of properties may be attached to a single variable.

## Examples

    (setq person 'bobby)                  ; create a var with a value
    (putprop person 'boogie 'last-name)   ; add a LAST-NAME property
    (putprop person 'disc-jockey 'job)    ; add a JOB property
    (putprop person '(10 20 30) 'stats)   ; add a STATS list

    (symbol-plist person)                 ; returns the property list:
                                          ;   (STATS (10 20 30)
                                          ;    JOB DISC-JOCKEY
                                          ;    LAST-NAME BOOGIE)

See the symbol-plist function in the XLISP 2.0 manual.

Back to Top

Nyquist / XLISP 2.0 - Contents | Tutorials | Examples | Reference