| Allegro CL version 8.2 Unrevised from 8.1 to 8.2. 8.1 version |
Arguments: object property-or-name
Returns the current value of a specified property of object. property-or-name should be either a property object or the symbol that names the property. When property-or-name is a property object, it should be one that was returned by calling properties on the same object that is now being passed to property-value. Passing the property object is more efficient than passing the property name.
To retrieve the values of particular properties when the names of the property-reader functions are known, it is more efficient to call the reader functions directly. But calling property-value may be useful for meta-level uses such as finding the values of all of the properties of an object. For example, the following function returns a list of the names and values of all of the properties of an object.
(defun list-properties (object) (mapcar #'(lambda (property) (list (name property) (property-value object property))) (properties object)))
If property-or-name is a symbol but no property
of object is found by that name, then an error is
signaled. Otherwise the property-reader of the property is called, and
the value that it returns is returned. If an error occurs in the call
to the property-reader function, the error is trapped and the keyword
:property-read-error
is returned.
See defproperties for information on defining properties on any type of object.
Copyright (c) 1998-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.1 page.
Created 2010.1.21.
| Allegro CL version 8.2 Unrevised from 8.1 to 8.2. 8.1 version |