1
0
Fork 0
cl-sites/novaspec.org/cl/f_remprop.html
2025-02-05 18:52:26 +01:00

468 lines
No EOL
9.1 KiB
HTML

<!DOCTYPE HTML>
<HTML LANG="en-us"
><HEAD
><TITLE
>remprop | Common Lisp Nova Spec</TITLE
><META CHARSET="US-ASCII"
><LINK REL="canonical" HREF="f_remprop.html"
><LINK REL="next" HREF="f_boundp.html" TYPE="text/html" TITLE="boundp"
><LINK REL="prev" HREF="f_get.html" TYPE="text/html" TITLE="get"
><LINK REL="up" HREF="10_2_Symbols_Dictionary.html" TYPE="text/html" TITLE="10.2 Symbols Dictionary"
><LINK REL="start" HREF="index.html" TYPE="text/html" TITLE="Common Lisp Nova Spec"
><META NAME="VIEWPORT" CONTENT="width=device-width, initial-scale=1.0"
><LINK REL="STYLESHEET" HREF="dpans.css%3F3909942064.css"
><SCRIPT SRC="dpans.js%3F3909942064"
></SCRIPT
><SCRIPT SRC="apropos.js%3F3909942064"
></SCRIPT
></HEAD
><BODY
><DIV
><DIV CLASS="topnav"
><DIV CLASS="breadcrumb"
><SPAN CLASS="breadcrumb-item"
><A HREF="index.html"
>Common Lisp Nova Spec</A
></SPAN
> <SPAN CLASS="breadcrumb-item"
>&#8594; <A HREF="10_Symbols.html"
>10. Symbols</A
></SPAN
> <SPAN CLASS="breadcrumb-item"
>&#8594; <A HREF="10_2_Symbols_Dictionary.html"
>10.2 Symbols Dictionary</A
></SPAN
> <SPAN CLASS="breadcrumb-item"
>&#8594; <A HREF="f_remprop.html"
>remprop</A
></SPAN
></DIV
><DIV CLASS="apropos"
><DIV CLASS="apropos-io"
><A HREF="f_get.html" CLASS="prev"
>&#8592;</A
><SPAN ID="apropos-label"
>Apropos </SPAN
><INPUT ID="apropos" AUTOFOCUS="AUTOFOCUS" PLACEHOLDER="Type here to search" ONINPUT="aproposInput(this);" ONKEYUP="aproposKeyup(event);" ONCHANGE="aproposChange(this);" ONFOCUS="aproposFocus(this);" ONFOCUSOUT="aproposFocusout(this);"
><A HREF="f_boundp.html" CLASS="next"
>&#8594;</A
></DIV
><DIV ID="apropos-res"
></DIV
></DIV
></DIV
><DIV CLASS="matter"
><DIV CLASS="com"
><DIV CLASS="begincom"
><HR
><TABLE WIDTH="100%" CELLSPACING="0" CELLPADDING="0"
><TR
><TD ALIGN="LEFT" VALIGN="BASELINE" WIDTH="100%" CLASS="name"
><SPAN CLASS="idx" DATA-KIND="idxref" DATA-TERM="remprop"
></SPAN
><B
>remprop</B
></TD
><TD ALIGN="RIGHT" VALIGN="BASELINE" WIDTH="0" NOWRAP="NOWRAP" CLASS="ftype"
><I
>Function</I
></TD
></TR
></TABLE
><HR
></DIV
><UL CLASS="subtoc"
></UL
><DL
><DT
><B
>Syntax</B
></DT
><DD
><P CLASS="j"
><B
>remprop</B
> <SPAN CLASS="cmssi"
>symbol</SPAN
> <SPAN CLASS="cmssi"
>indicator</SPAN
> <SPAN CLASS="arrow"
>&#8594;</SPAN
> <SPAN CLASS="cmssi"
>generalized-boolean</SPAN
></P
></DD
><DT
><B
>Arguments and Values</B
></DT
><DD
><P CLASS="j"
><VAR CLASS="param"
>symbol</VAR
> &#8212; a <A HREF="26_1_Glossary.html#symbol"
><EM CLASS="term"
>symbol</EM
></A
>. </P
><P CLASS="j"
><VAR CLASS="param"
>indicator</VAR
> &#8212; an <A HREF="26_1_Glossary.html#object"
><EM CLASS="term"
>object</EM
></A
>. </P
><P CLASS="j"
><VAR CLASS="param"
>generalized-boolean</VAR
> &#8212; a <A HREF="26_1_Glossary.html#generalized_boolean"
><EM CLASS="term"
>generalized boolean</EM
></A
>.</P
></DD
><DT
><B
>Description</B
></DT
><DD
><P CLASS="j"
><A HREF="f_remprop.html" CLASS="funref"
><B
>remprop</B
></A
> removes from the <A HREF="26_1_Glossary.html#property_list"
><EM CLASS="term"
>property list</EM
></A
><SPAN CLASS="meaning"
><SUB CLASS="sub"
><SPAN CLASS="cmr"
>2</SPAN
></SUB
></SPAN
> of <VAR CLASS="param"
>symbol</VAR
> a <A HREF="26_1_Glossary.html#property"
><EM CLASS="term"
>property</EM
></A
><SPAN CLASS="meaning"
><SUB CLASS="sub"
><SPAN CLASS="cmr"
>1</SPAN
></SUB
></SPAN
> with a <A HREF="26_1_Glossary.html#property_indicator"
><EM CLASS="term"
>property indicator</EM
></A
> <A HREF="26_1_Glossary.html#identical"
><EM CLASS="term"
>identical</EM
></A
> to <VAR CLASS="param"
>indicator</VAR
>. If there are multiple <EM CLASS="term"
>properties</EM
><SPAN CLASS="meaning"
><SUB CLASS="sub"
><SPAN CLASS="cmr"
>1</SPAN
></SUB
></SPAN
> with the <A HREF="26_1_Glossary.html#identical"
><EM CLASS="term"
>identical</EM
></A
> key, <A HREF="f_remprop.html" CLASS="funref"
><B
>remprop</B
></A
> only removes the first such <A HREF="26_1_Glossary.html#property"
><EM CLASS="term"
>property</EM
></A
>. <A HREF="f_remprop.html" CLASS="funref"
><B
>remprop</B
></A
> returns <A HREF="26_1_Glossary.html#false"
><EM CLASS="term"
>false</EM
></A
> if no such <A HREF="26_1_Glossary.html#property"
><EM CLASS="term"
>property</EM
></A
> was found, or <A HREF="26_1_Glossary.html#true"
><EM CLASS="term"
>true</EM
></A
> if a property was found. </P
><P CLASS="j"
>The <A HREF="26_1_Glossary.html#property_indicator"
><EM CLASS="term"
>property indicator</EM
></A
> and the corresponding <A HREF="26_1_Glossary.html#property_value"
><EM CLASS="term"
>property value</EM
></A
> are removed in an undefined order by destructively splicing the property list. The permissible side-effects correspond to those permitted for <A HREF="f_remf.html" CLASS="macref"
><B
>remf</B
></A
>, such that:</P
><PRE CLASS="screen"
>(remprop <I CLASS="i"
><I
>x</I
></I
> <I CLASS="i"
><I
>y</I
></I
>) <SPAN CLASS="cmsy"
><SPAN STYLE="font-size:16px;vertical-align:-2px"
>&#8801;</SPAN
></SPAN
> (remf (symbol-plist <I CLASS="i"
><I
>x</I
></I
>) <I CLASS="i"
><I
>y</I
></I
>)</PRE
></DD
><DT
><B
>Examples</B
></DT
><DD
><PRE CLASS="screen"
> (setq test (make-symbol "PSEUDO-PI")) <SPAN CLASS="cmsy"
><SPAN CLASS="arrow"
>&#8594;</SPAN
></SPAN
> #:PSEUDO-PI
(symbol-plist test) <SPAN CLASS="cmsy"
><SPAN CLASS="arrow"
>&#8594;</SPAN
></SPAN
> ()
(setf (get test 'constant) t) <SPAN CLASS="cmsy"
><SPAN CLASS="arrow"
>&#8594;</SPAN
></SPAN
> T
(setf (get test 'approximation) 3.14) <SPAN CLASS="cmsy"
><SPAN CLASS="arrow"
>&#8594;</SPAN
></SPAN
> 3.14
(setf (get test 'error-range) 'noticeable) <SPAN CLASS="cmsy"
><SPAN CLASS="arrow"
>&#8594;</SPAN
></SPAN
> NOTICEABLE
(symbol-plist test)
<SPAN CLASS="cmsy"
><SPAN CLASS="arrow"
>&#8594;</SPAN
></SPAN
> (ERROR-RANGE NOTICEABLE APPROXIMATION 3.14 CONSTANT T)
(setf (get test 'approximation) nil) <SPAN CLASS="cmsy"
><SPAN CLASS="arrow"
>&#8594;</SPAN
></SPAN
> NIL
(symbol-plist test)
<SPAN CLASS="cmsy"
><SPAN CLASS="arrow"
>&#8594;</SPAN
></SPAN
> (ERROR-RANGE NOTICEABLE APPROXIMATION NIL CONSTANT T)
(get test 'approximation) <SPAN CLASS="cmsy"
><SPAN CLASS="arrow"
>&#8594;</SPAN
></SPAN
> NIL
(remprop test 'approximation) <SPAN CLASS="cmsy"
><SPAN CLASS="arrow"
>&#8594;</SPAN
></SPAN
> <A HREF="26_1_Glossary.html#true"
><EM CLASS="term"
>true</EM
></A
>
(get test 'approximation) <SPAN CLASS="cmsy"
><SPAN CLASS="arrow"
>&#8594;</SPAN
></SPAN
> NIL
(symbol-plist test)
<SPAN CLASS="cmsy"
><SPAN CLASS="arrow"
>&#8594;</SPAN
></SPAN
> (ERROR-RANGE NOTICEABLE CONSTANT T)
(remprop test 'approximation) <SPAN CLASS="cmsy"
><SPAN CLASS="arrow"
>&#8594;</SPAN
></SPAN
> NIL
(symbol-plist test)
<SPAN CLASS="cmsy"
><SPAN CLASS="arrow"
>&#8594;</SPAN
></SPAN
> (ERROR-RANGE NOTICEABLE CONSTANT T)
(remprop test 'error-range) <SPAN CLASS="cmsy"
><SPAN CLASS="arrow"
>&#8594;</SPAN
></SPAN
> <A HREF="26_1_Glossary.html#true"
><EM CLASS="term"
>true</EM
></A
>
(setf (get test 'approximation) 3) <SPAN CLASS="cmsy"
><SPAN CLASS="arrow"
>&#8594;</SPAN
></SPAN
> 3
(symbol-plist test)
<SPAN CLASS="cmsy"
><SPAN CLASS="arrow"
>&#8594;</SPAN
></SPAN
> (APPROXIMATION 3 CONSTANT T)</PRE
></DD
><DT
><B
>Side Effects</B
></DT
><DD
><P CLASS="j"
>The <A HREF="26_1_Glossary.html#property_list"
><EM CLASS="term"
>property list</EM
></A
> of <VAR CLASS="param"
>symbol</VAR
> is modified.</P
></DD
><DT
><B
>Exceptional Situations</B
></DT
><DD
><P CLASS="j"
>Should signal an error of <A HREF="26_1_Glossary.html#type"
><EM CLASS="term"
>type</EM
></A
> <A HREF="t_type-error.html" CLASS="typeref"
><B
>type-error</B
></A
> if <VAR CLASS="param"
>symbol</VAR
> is not a <A HREF="26_1_Glossary.html#symbol"
><EM CLASS="term"
>symbol</EM
></A
>.</P
></DD
><DT
><B
>See Also</B
></DT
><DD
><P CLASS="j"
><A HREF="f_remf.html" CLASS="macref"
><B
>remf</B
></A
>, <A HREF="f_symbol-plist.html" CLASS="funref"
><B
>symbol-plist</B
></A
></P
></DD
><DT
><B
>Notes</B
></DT
><DD
><P CLASS="j"
><A HREF="26_1_Glossary.html#number"
><EM CLASS="term"
>Numbers</EM
></A
> and <A HREF="26_1_Glossary.html#character"
><EM CLASS="term"
>characters</EM
></A
> are not recommended for use as <VAR CLASS="param"
>indicators</VAR
> in portable code since <A HREF="f_remprop.html" CLASS="funref"
><B
>remprop</B
></A
> tests with <A HREF="f_eq.html" CLASS="funref"
><B
>eq</B
></A
> rather than <A HREF="f_eql.html" CLASS="funref"
><B
>eql</B
></A
>, and consequently the effect of using such <VAR CLASS="param"
>indicators</VAR
> is <A HREF="26_1_Glossary.html#implementation-dependent"
><EM CLASS="term"
>implementation-dependent</EM
></A
>. Of course, if you&#8217;ve gotten as far as needing to remove such a <A HREF="26_1_Glossary.html#property"
><EM CLASS="term"
>property</EM
></A
>, you don&#8217;t have much choice &#8212; the time to have been thinking about this was when you used <A HREF="f_setf.html" CLASS="macref"
><B
>setf</B
></A
> of <A HREF="f_get.html" CLASS="funref"
><B
>get</B
></A
> to establish the <A HREF="26_1_Glossary.html#property"
><EM CLASS="term"
>property</EM
></A
>.</P
></DD
></DL
></DIV
></DIV
><DIV CLASS="footer"
><DIV CLASS="btmnav"
><A HREF="f_get.html" CLASS="prev"
>&#8592;</A
><A HREF="f_boundp.html" CLASS="next"
>&#8594;</A
></DIV
><DIV CLASS="trail"
>Conversion to HTML copyright 2023 by Gilbert Baumann</DIV
></DIV
></DIV
><SCRIPT
>domReady();</SCRIPT
></BODY
></HTML
>