1
0
Fork 0
cl-sites/HyperSpec-7-0/HyperSpec/Body/v_featur.htm
2024-04-01 10:24:07 +02:00

67 lines
12 KiB
HTML

<!-- Common Lisp HyperSpec (TM), version 7.0 generated by Kent M. Pitman on Mon, 11-Apr-2005 2:31am EDT -->
<HTML>
<HEAD>
<TITLE>CLHS: Variable *FEATURES*</TITLE>
<LINK HREF="../Data/clhs.css" REL="stylesheet" TYPE="text/css" />
<META HTTP-EQUIV="Author" CONTENT="Kent M. Pitman">
<META HTTP-EQUIV="Organization" CONTENT="LispWorks Ltd.">
<LINK REL=TOP HREF="../Front/index.htm">
<LINK REL=COPYRIGHT HREF="../Front/Help.htm#Legal">
<LINK REL=DISCLAIMER HREF="../Front/Help.htm#Disclaimer">
<LINK REL=PREV HREF="m_w_comp.htm">
<LINK REL=UP HREF="c_system.htm">
<LINK REL=NEXT HREF="v_cmp_fi.htm">
</HEAD>
<BODY>
<H1><A REV=MADE HREF="http://www.lispworks.com/"><IMG WIDTH=80 HEIGHT=65 ALT="[LISPWORKS]" SRC="../Graphics/LWSmall.gif" ALIGN=Bottom></A><A REL=TOP HREF="../Front/index.htm"><IMG WIDTH=237 HEIGHT=65 ALT="[Common Lisp HyperSpec (TM)]" SRC="../Graphics/CLHS_Sm.gif" ALIGN=Bottom></A> <A REL=PREV HREF="m_w_comp.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Previous]" SRC="../Graphics/Prev.gif" ALIGN=Bottom></A><A REL=UP HREF="c_system.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Up]" SRC="../Graphics/Up.gif" ALIGN=Bottom></A><A REL=NEXT HREF="v_cmp_fi.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Next]" SRC="../Graphics/Next.gif" ALIGN=Bottom></A></H1>
<HR>
<A NAME="STfeaturesST"><I>Variable</I> <B>*FEATURES*</B></A> <P>
<P><B>Value Type:</B><P>
<P>
a <A REL=DEFINITION HREF="26_glo_p.htm#proper_list"><I>proper list</I></A>. <P>
<P><B>Initial Value:</B><P>
<P>
<A REL=DEFINITION HREF="26_glo_i.htm#implementation-dependent"><I>implementation-dependent</I></A>. <P>
<P><B>Description:</B><P>
<P>
The <A REL=DEFINITION HREF="26_glo_v.htm#value"><I>value</I></A> of <A REL=DEFINITION HREF="#STfeaturesST"><B>*features*</B></A> is called the <A REL=DEFINITION HREF="26_glo_f.htm#features_list"><I>features list</I></A>. It is a <A REL=DEFINITION HREF="26_glo_l.htm#list"><I>list</I></A> of <A REL=DEFINITION HREF="26_glo_s.htm#symbol"><I>symbols</I></A>, called <A REL=DEFINITION HREF="26_glo_f.htm#feature"><I>features</I></A>, that correspond to some aspect of the <A REL=DEFINITION HREF="26_glo_i.htm#implementation"><I>implementation</I></A> or <A REL=DEFINITION HREF="26_glo_e.htm#environment"><I>environment</I></A>. <P>
Most <A REL=DEFINITION HREF="26_glo_f.htm#feature"><I>features</I></A> have <A REL=DEFINITION HREF="26_glo_i.htm#implementation-dependent"><I>implementation-dependent</I></A> meanings; The following meanings have been assigned to feature names: <P>
<P><DL><P>
<DT><TT>:cltl1</TT> <P><DD>
If present, indicates that the <TT>LISP</TT> package <A REL=DEFINITION HREF="26_glo_p.htm#purports_to_conform"><I>purports to conform</I></A> to the 1984 specification <I>Common Lisp: The Language</I>. It is possible, but not required, for a <A REL=DEFINITION HREF="26_glo_c.htm#conforming_implementation"><I>conforming implementation</I></A> to have this feature because this specification specifies that its <A REL=DEFINITION HREF="26_glo_s.htm#symbol"><I>symbols</I></A> are to be in the <TT>COMMON-LISP</TT> package, not the <TT>LISP</TT> package. <P>
<DT><TT>:cltl2</TT> <P><DD>
If present, indicates that the implementation <A REL=DEFINITION HREF="26_glo_p.htm#purports_to_conform"><I>purports to conform</I></A> to <A REL=CITATION HREF="http://www.cs.cmu.edu/Web/Groups/AI/html/cltl/cltl2.html"><I>Common Lisp: The Language, Second Edition</I></A>. This feature must not be present in any <A REL=DEFINITION HREF="26_glo_c.htm#conforming_implementation"><I>conforming implementation</I></A>, since conformance to that document is not compatible with conformance to this specification. The name, however, is reserved by this specification in order to help programs distinguish implementations which conform to that document from implementations which conform to this specification. <P>
<DT><TT>:ieee-floating-point</TT> <P><DD>
If present, indicates that the implementation <A REL=DEFINITION HREF="26_glo_p.htm#purports_to_conform"><I>purports to conform</I></A> to the requirements of <I>IEEE Standard for Binary Floating-Point Arithmetic</I>. <P>
<DT><TT>:x3j13</TT> <P><DD>
If present, indicates that the implementation conforms to some particular working draft of this specification, or to some subset of features that approximates a belief about what this specification might turn out to contain. A <A REL=DEFINITION HREF="26_glo_c.htm#conforming_implementation"><I>conforming implementation</I></A> might or might not contain such a feature. (This feature is intended primarily as a stopgap in order to provide implementors something to use prior to the availability of a draft standard, in order to discourage them from introducing the <TT>:draft-ansi-cl</TT> and <TT>:ansi-cl</TT> <A REL=DEFINITION HREF="26_glo_f.htm#feature"><I>features</I></A> prematurely.) <P>
<DT><TT>:draft-ansi-cl</TT> <P><DD>
If present, indicates that the <A REL=DEFINITION HREF="26_glo_i.htm#implementation"><I>implementation</I></A> <A REL=DEFINITION HREF="26_glo_p.htm#purports_to_conform"><I>purports to conform</I></A> to the first full draft of this specification, which went to public review in 1992. A <A REL=DEFINITION HREF="26_glo_c.htm#conforming_implementation"><I>conforming implementation</I></A> which has the <TT>:draft-ansi-cl-2</TT> or <TT>:ansi-cl</TT> <A REL=DEFINITION HREF="26_glo_f.htm#feature"><I>feature</I></A> is not permitted to retain the <TT>:draft-ansi-cl</TT> <A REL=DEFINITION HREF="26_glo_f.htm#feature"><I>feature</I></A> since incompatible changes were made subsequent to the first draft. <P>
<DT><TT>:draft-ansi-cl-2</TT> <P><DD>
If present, indicates that a second full draft of this specification has gone to public review, and that the <A REL=DEFINITION HREF="26_glo_i.htm#implementation"><I>implementation</I></A> <A REL=DEFINITION HREF="26_glo_p.htm#purports_to_conform"><I>purports to conform</I></A> to that specification. (If additional public review drafts are produced, this keyword will continue to refer to the second draft, and additional keywords will be added to identify conformance with such later drafts. As such, the meaning of this keyword can be relied upon not to change over time.) A <A REL=DEFINITION HREF="26_glo_c.htm#conforming_implementation"><I>conforming implementation</I></A> which has the <TT>:ansi-cl</TT> <A REL=DEFINITION HREF="26_glo_f.htm#feature"><I>feature</I></A> is only permitted to retain the <TT>:draft-ansi-cl</TT> <A REL=DEFINITION HREF="26_glo_f.htm#feature"><I>feature</I></A> if the finally approved standard is not incompatible with the draft standard. <P>
<DT><TT>:ansi-cl</TT> <P><DD>
If present, indicates that this specification has been adopted by ANSI as an official standard, and that the <A REL=DEFINITION HREF="26_glo_i.htm#implementation"><I>implementation</I></A> <A REL=DEFINITION HREF="26_glo_p.htm#purports_to_conform"><I>purports to conform</I></A>. <P>
<DT><TT>:common-lisp</TT> <P><DD>
This feature must appear in <A REL=DEFINITION HREF="#STfeaturesST"><B>*features*</B></A> for any implementation that has one or more of the features <TT>:x3j13</TT>, <TT>:draft-ansi-cl</TT>, or <TT>:ansi-cl</TT>. It is intended that it should also appear in implementations which have the features <TT>:cltl1</TT> or <TT>:cltl2</TT>, but this specification cannot force such behavior. The intent is that this feature should identify the language family named ``Common Lisp,'' rather than some specific dialect within that family. <P>
<P></DL> <P>
<P><B>Examples:</B> None.
<P>
<P><B>Affected By:</B> None.
<P>
<P><B>See Also:</B><P>
<P>
<A REL=CHILD HREF="01_ebaa.htm">Section 1.5.2.1.1 (Use of Read-Time Conditionals)</A>, <A REL=CHILD HREF="02_d.htm">Section 2.4 (Standard Macro Characters)</A> <P>
<P><B>Notes:</B><P>
<P>
The <A REL=DEFINITION HREF="26_glo_v.htm#value"><I>value</I></A> of <A REL=DEFINITION HREF="#STfeaturesST"><B>*features*</B></A> is used by the <TT>#+</TT> and <TT>#-</TT> reader syntax. <P>
<A REL=DEFINITION HREF="26_glo_s.htm#symbol"><I>Symbols</I></A> in the <A REL=DEFINITION HREF="26_glo_f.htm#features_list"><I>features list</I></A> may be in any <A REL=DEFINITION HREF="26_glo_p.htm#package"><I>package</I></A>, but in practice they are generally in the <TT>KEYWORD</TT> package. This is because <TT>KEYWORD</TT> is the <A REL=DEFINITION HREF="26_glo_p.htm#package"><I>package</I></A> used by default when <I>reading</I>[2] <A REL=DEFINITION HREF="26_glo_f.htm#feature_expression"><I>feature expressions</I></A> in the <TT>#+</TT> and <TT>#-</TT> <A REL=DEFINITION HREF="26_glo_r.htm#reader_macro"><I>reader macros</I></A>. <A REL=DEFINITION HREF="26_glo_c.htm#code"><I>Code</I></A> that needs to name a <A REL=DEFINITION HREF="26_glo_f.htm#feature"><I>feature</I></A>[2] in a <A REL=DEFINITION HREF="26_glo_p.htm#package"><I>package</I></A> P (other than <TT>KEYWORD</TT>) can do so by making explicit use of a <A REL=DEFINITION HREF="26_glo_p.htm#package_prefix"><I>package prefix</I></A> for P, but note that such <A REL=DEFINITION HREF="26_glo_c.htm#code"><I>code</I></A> must also assure that the <A REL=DEFINITION HREF="26_glo_p.htm#package"><I>package</I></A> P exists in order for the <A REL=DEFINITION HREF="26_glo_f.htm#feature_expression"><I>feature expression</I></A> to be <A REL=DEFINITION HREF="26_glo_r.htm#read"><I>read</I></A>[2]---even in cases where the <A REL=DEFINITION HREF="26_glo_f.htm#feature_expression"><I>feature expression</I></A> is expected to fail. <P>
It is generally considered wise for an <A REL=DEFINITION HREF="26_glo_i.htm#implementation"><I>implementation</I></A> to include one or more <A REL=DEFINITION HREF="26_glo_f.htm#feature"><I>features</I></A> identifying the specific <A REL=DEFINITION HREF="26_glo_i.htm#implementation"><I>implementation</I></A>, so that conditional expressions can be written which distinguish idiosyncrasies of one <A REL=DEFINITION HREF="26_glo_i.htm#implementation"><I>implementation</I></A> from those of another. Since features are normally <A REL=DEFINITION HREF="26_glo_s.htm#symbol"><I>symbols</I></A> in the <TT>KEYWORD</TT> package where name collisions might easily result, and since no uniquely defined mechanism is designated for deciding who has the right to use which <A REL=DEFINITION HREF="26_glo_s.htm#symbol"><I>symbol</I></A> for what reason, a conservative strategy is to prefer names derived from one's own company or product name, since those names are often trademarked and are hence less likely to be used unwittingly by another <A REL=DEFINITION HREF="26_glo_i.htm#implementation"><I>implementation</I></A>. <P>
<P><HR>The following <A REL=META HREF="../Front/X3J13Iss.htm">X3J13 cleanup issues</A>, <I>not part of the specification</I>, apply to this section:<P><UL><LI> <A REL=CHILD HREF="../Issues/iss318.htm">SHARPSIGN-PLUS-MINUS-PACKAGE:KEYWORD</A><LI> <A REL=CHILD HREF="../Issues/iss056.htm">COMMON-FEATURES:SPECIFY</A><P></UL><HR>
<A REL=NAVIGATOR HREF="../Front/StartPts.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Starting Points]" SRC="../Graphics/StartPts.gif" ALIGN=Bottom></A><A REL=TOC HREF="../Front/Contents.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Contents]" SRC="../Graphics/Contents.gif" ALIGN=Bottom></A><A REL=INDEX HREF="../Front/X_Master.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Index]" SRC="../Graphics/Index.gif" ALIGN=Bottom></A><A REL=INDEX HREF="../Front/X_Symbol.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Symbols]" SRC="../Graphics/Symbols.gif" ALIGN=Bottom></A><A REL=GLOSSARY HREF="../Body/26_a.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Glossary]" SRC="../Graphics/Glossary.gif" ALIGN=Bottom></A><A HREF="../Front/X3J13Iss.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Issues]" SRC="../Graphics/Issues.gif" ALIGN=Bottom></A><BR>
<A REL=COPYRIGHT HREF="../Front/Help.htm#Legal"><I>Copyright 1996-2005, LispWorks Ltd. All rights reserved.</I></A><P>
</BODY>
</HTML>