Structural Informatics Group (SIG) logo
Home | Projects | Demos | Downloads | Publications | Local Info | About Us | New site
Go to the first, previous, next, last section, table of contents.

remprop

remprop

type: function (subr) 
location: built-in
source file: xlbfun.c
Common LISP compatible: no
supported on: all machines

SYNTAX

(remprop <symbol> <property> )
        <symbol>        -       the symbol with a property list
        <property>      -       the property name being removed

DESCRIPTION

REMPROP removes the <property> from the <symbol>. The function returns a NIL. If the <property> does not exist, there is no error generated. The <symbol> must be an existing symbol. 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
(get person 'last-name)                 ; retrieve LAST-NAME - boogie
(get person 'job)                       ; retrieve JOB - disc-jockey
(get person 'height)                    ; non-existant - returns NIL
(remprop person 'job)                   ; remove JOB
(remprop person 'height)                ; remove non-existant

COMMON LISP COMPATIBILITY: Common LISP does not have a REMPROP function. It uses a SETF to achieve this functionality. Porting from Common LISP to XLISP will work fine since XLISP supports the SETF modifications of property lists and GET. Porting from XLISP to Common LISP will require translating REMPROP into SETF forms.


Go to the first, previous, next, last section, table of contents.