User Tools

A PCRE internal error occured. This might be caused by a faulty plugin


This shows you the differences between two versions of the page.

Link to this comparison view

cl:functions:get-properties [2019/09/14 05:00]
cl:functions:get-properties [2021/01/26 04:00] (current)
Line 1: Line 1:
 +====== Function GET-PROPERTIES ======
 +  * **get-properties** //plist indicator-list//​ → //​indicator,​ value, tail//
 +====Arguments and Values==== ​
 +  * //plist// - a //​[[CL:​Glossary:​property list]]//.
 +  * //​indicator-list//​ - a //​[[CL:​Glossary:​proper list]]// (of //​[[CL:​Glossary:​indicator|indicators]]//​).
 +  * //​indicator//​ - an //​[[CL:​Glossary:​object]]//​ that is an //​[[CL:​Glossary:​element]]//​ of //​indicator-list//​.
 +  * //value// - an //​[[CL:​Glossary:​object]]//​.
 +  * //tail// - a //​[[CL:​Glossary:​list]]//​.
 +**[[CL:​Functions:​get-properties]]** is used to look up any of several //​[[CL:​Glossary:​property list]]// entries all at once.
 +It searches the //plist// for the first entry whose //​[[CL:​Glossary:​indicator]]//​ is //​[[CL:​Glossary:​identical]]//​ to one of the //​[[CL:​Glossary:​objects]]//​ in //​indicator-list//​. If such an entry is found, the //​indicator//​ and //value// returned are the //​[[CL:​Glossary:​property indicator]]//​ and its associated //​[[CL:​Glossary:​property value]]//, and the //tail// returned is the //​[[CL:​Glossary:​tail]]//​ of the //plist// that begins with the found entry (i.e. whose //​[[CL:​Glossary:​car]]//​ is the //​indicator//​). If no such entry is found, the //​indicator//,​ //value//, and //​tail// ​ are all **[[CL:​Constant Variable:​nil]]**.
 +([[CL:​Macros:​defparameter]] *x* '()) <​r>​*X*</​r>​
 +([[CL:​Macros:​defparameter]] *indicator-list* '​(prop1 prop2)) <​r>​*INDICATOR-LIST*</​r>​
 +([[CL:​Functions:​getf]] *x* '​prop1) <​r>​[[CL:​Constant Variable:​nil|NIL]]</​r>​
 +([[CL:​Macros:​setf]] ([[CL:​Functions:​getf]] *x* '​prop1) 'val1) <​r>​VAL1</​r>​
 +([[CL:​Functions:​eq]] ([[CL:​Functions:​getf]] *x* '​prop1) 'val1) <​r>​[[CL:​Glossary:​true]]</​r>​
 +(get-properties *x* *indicator-list*)
 +(PROP1 VAL1)</​r>​
 +*x* <​r>​(PROP1 VAL1)</​r>​
 +====Side Effects====
 +====Affected By====
 +====Exceptional Situations====
 +====See Also====
 +**[[CL:​Functions:​get|Function GET]]**, **[[CL:​Functions:​getf|Function GETF]]**
 +====Example Implementation====
 +To be done.