/doc/impnotes.html
HTML | 1719 lines | 1702 code | 1 blank | 16 comment | 0 complexity | 3dbe20f1576f2bd5a9b8f6a0900df65b MD5 | raw file
Possible License(s): LGPL-2.0, GPL-2.0, BSD-3-Clause
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Implementation Notes for GNU CLISP</title><link rel="stylesheet" href="impnotes.css" type="text/css" /><link rev="made" href="mailto:clisp-list@lists.sourceforge.net" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_7566" /><meta name="description" content="This document describes the GNU CLISP - an implementation of the ANSI CL standard. See for instructions on how to report bugs (both in these notes and in CLISP itself). See for information on CLISP support." /><meta name="keywords" content="Lisp, Common Lisp, CLISP" /><meta name="date" content="'generated: 2008-02-02 20:37:32-05:00'" /><link rel="author" title="Authors" href="#authors" /><link rel="contents" title="Table of Contents" href="index.html" /><link rel="glossary" href="#glossary" /><link rel="help" href="#faq-help" title="How do I ask for help?" /><link rel="home" title="Home" href="http://clisp.cons.org" /><link rel="index" href="idx.html" /></head><body><div class="book" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="impnotes-top"></a>Implementation Notes for <a class="ulink" href="http://www.gnu.org" target="_top">GNU</a> <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a></h1></div><div><h2 class="subtitle">These notes document <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> version 2.44</h2></div><div><h3 class="corpauthor"><span class="inlinemediaobject"><img src="clisp.png" /></span></h3></div><div><div class="authorgroup"><a id="authors"></a><div class="author"><h3 class="author"><span class="firstname">Bruno</span> <span class="surname">Haible</span></h3></div><div class="author"><h3 class="author"><span class="firstname">Michael</span> <span class="surname">Stoll</span></h3></div><div class="author"><h3 class="author"><span class="firstname">Sam</span> <span class="surname">Steingold</span></h3></div><div class="othercredit"><h3 class="othercredit"><span class="othername">See
- <span class="emphasis"><em><a class="clisp-cvs" href="http://clisp.cvs.sourceforge.net/*checkout*/clisp/clisp/COPYRIGHT"><code class="filename">COPYRIGHT</code></a></em></span>
- for the list of other contributors and the license.
- </span></h3></div></div></div><div><p class="copyright">Copyright © 1992-2008 Bruno Haible</p></div><div><p class="copyright">Copyright © 1998-2008 Sam Steingold</p></div><div><div class="legalnotice"><a id="legalese"></a><p class="legalnotice-title"><b>Legal Status of the <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a>
- Implementation Notes</b></p><p>These notes are dually licensed under <a class="ulink" href="http://www.gnu.org" target="_top">GNU</a> <a class="ulink" href="http://www.gnu.org/copyleft/fdl.html" target="_top">GFDL</a> and <a class="ulink" href="http://www.gnu.org" target="_top">GNU</a> <a class="ulink" href="http://www.gnu.org/copyleft/gpl.html" target="_top">GPL</a>.
- This means that you can redistribute this document under
- either of these two licenses, at your choice.</p><p><b>These notes are covered by the <a class="ulink" href="http://www.gnu.org" target="_top">GNU</a> <a class="ulink" href="http://www.gnu.org/copyleft/fdl.html" target="_top">GFDL</a>. </b>Permission is granted to copy, distribute and/or modify this
- document under the terms of the GNU Free Documentation License
- (<a class="ulink" href="http://www.gnu.org/copyleft/fdl.html" target="_top">GFDL</a>), either version 1.2 of the License, or (at your option) any
- later version published by the <a class="ulink" href="http://www.fsf.org" target="_top">Free Software Foundation (FSF)</a>;
- with no Invariant Sections,
- with no Front-Cover Text, and
- with no Back-Cover Texts.
- A copy of the license is included in <a class="xref" href="#gfdl" title="Appendix B. GNU Free Documentation License">Appendix B, <i>GNU Free Documentation License</i></a>.
- </p><p><b>These notes are covered by the <a class="ulink" href="http://www.gnu.org" target="_top">GNU</a> <a class="ulink" href="http://www.gnu.org/copyleft/gpl.html" target="_top">GPL</a>. </b>This document documents free software; you can redistribute it
- and/or modify it under the terms of the GNU General Public License
- (<a class="ulink" href="http://www.gnu.org/copyleft/gpl.html" target="_top">GPL</a>), either version 2 of the License, or (at your option) any
- later version published by the <a class="ulink" href="http://www.fsf.org" target="_top">Free Software Foundation (FSF)</a>.
- A copy of the license is included in <a class="xref" href="#gpl" title="Appendix C. GNU General Public License">Appendix C, <i>GNU General Public License</i></a>.
- </p></div></div><div><div class="revhistory"><table border="1" width="100%" summary="Revision history"><tr><th align="left" valign="top" colspan="3"><b>CLISP Release History</b></th></tr><tr><td align="left">Release <span class="revnumber">1</span></td><td align="left"><span class="revdate">April 1987 - July 1992</span></td><td align="left">bruno</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li>The project was
- started when both original authors, <span class="authorinitials">bruno</span> and <span class="author"><span class="firstname">Michael</span> <span class="surname">Stoll</span></span>, were
- students in Germany.</li><li>The original version was for <a class="ulink" href="http://www.atari.org/" target="_top"><span class="platform">Atari</span></a> ST only,
- written in 68000 assembly language and Common Lisp.</li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.0</span></td><td align="left"><span class="revdate">1992-10-09</span></td><td align="left">bruno</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li>comp.os.linux announcement
- (<a class="ulink" href="http://www.linux.org/" target="_top"><span class="platform">Linux</span></a> binaries only)</li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.1</span></td><td align="left"><span class="revdate">1993-01-01</span></td><td align="left">bruno</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li>The first portable
- release, with source, released under <a class="ulink" href="http://www.gnu.org" target="_top">GNU</a> <a class="ulink" href="http://www.gnu.org/copyleft/gpl.html" target="_top">GPL</a>.</li><li>Supported platforms: <a class="ulink" href="http://www.atari.org/" target="_top"><span class="platform">Atari</span></a> ST, <a class="ulink" href="http://www.amiga.org/" target="_top"><span class="platform">Amiga</span></a> 500-2000, <a class="ulink" href="http://www.freedos.org/" target="_top"><span class="platform">DOS</span></a>
- (emx, djgpp), <a class="ulink" href="http://www.os2.org/" target="_top"><span class="platform">OS/2</span></a> (emx), Unix (<a class="ulink" href="http://www.linux.org/" target="_top"><span class="platform">Linux</span></a>, Sun4, Sun386, HP9000/800).
- </li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.1.1</span></td><td align="left"><span class="revdate">1993-01-11</span></td><td align="left">bruno</td></tr><tr><td align="left">Release <span class="revnumber">2.1.2</span></td><td align="left"><span class="revdate">1993-02-01</span></td><td align="left">bruno</td></tr><tr><td align="left">Release <span class="revnumber">2.1.3</span></td><td align="left"><span class="revdate">1993-02-03</span></td><td align="left">bruno</td></tr><tr><td align="left">Release <span class="revnumber">2.2</span></td><td align="left"><span class="revdate">1993-02-21</span></td><td align="left">bruno</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li>Add test suite.
- </li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.2.1</span></td><td align="left"><span class="revdate">1993-03-04</span></td><td align="left">bruno</td></tr><tr><td align="left">Release <span class="revnumber">2.2.2</span></td><td align="left"><span class="revdate">1993-03-19</span></td><td align="left">bruno</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li><a class="link" href="#ed" title="25.2.9. Function ED"><code class="varname">CUSTOM:*EDITOR*</code></a>
- </li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.3</span></td><td align="left"><span class="revdate">1993-03-30</span></td><td align="left">bruno</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/speope_load-time-value.html" target="_top"><code class="function">LOAD-TIME-VALUE</code></a></li><li><a class="link" href="#default-dir" title="Function EXT:DEFAULT-DIRECTORY"><code class="function">EXT:DEFAULT-DIRECTORY</code></a></li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.3.1</span></td><td align="left"><span class="revdate">1993-04-05</span></td><td align="left">bruno</td></tr><tr><td align="left">Release <span class="revnumber">2.4</span></td><td align="left"><span class="revdate">1993-05-24</span></td><td align="left">bruno</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defpackage.html" target="_top"><code class="function">DEFPACKAGE</code></a></li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_function-_a-expression.html" target="_top"><code class="function">FUNCTION-LAMBDA-EXPRESSION</code></a></li><li><a class="xref" href="#screen" title="32.1. Random Screen Access">Section 32.1, “Random Screen Access”</a></li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.5</span></td><td align="left"><span class="revdate">1993-06-29</span></td><td align="left">bruno</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_setfcm_psetf.html" target="_top"><code class="function">SETF</code></a> function names.</li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_print-unr_dable-object.html" target="_top"><code class="function">PRINT-UNREADABLE-OBJECT</code></a></li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/speope_symbol-macrolet.html" target="_top"><code class="function">SYMBOL-MACROLET</code></a></li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.5.1</span></td><td align="left"><span class="revdate">1993-07-17</span></td><td align="left">bruno</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li>immutable objects</li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.6</span></td><td align="left"><span class="revdate">1993-08-22</span></td><td align="left">bruno</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li><a class="link" href="#classes" title="4.2. Classes [CLHS-4.3]"><strong class="package">“<span class="quote">CLOS</span>”</strong></a> package:
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defclass.html" target="_top"><code class="function">DEFCLASS</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defmethod.html" target="_top"><code class="function">DEFMETHOD</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defgeneric.html" target="_top"><code class="function">DEFGENERIC</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_generic-function.html" target="_top"><code class="classname">GENERIC-FUNCTION</code></a>,
- <a class="link" href="#gen-flet"><code class="function">CLOS:GENERIC-FLET</code></a>, <a class="link" href="#gen-labels"><code class="function">CLOS:GENERIC-LABELS</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_with-slots.html" target="_top"><code class="function">WITH-SLOTS</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_with-accessors.html" target="_top"><code class="function">WITH-ACCESSORS</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/acc_find-class.html" target="_top"><code class="function">FIND-CLASS</code></a>, (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_setfcm_psetf.html" target="_top"><code class="function">SETF</code></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/acc_find-class.html" target="_top"><code class="function">FIND-CLASS</code></a>), <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_class-of.html" target="_top"><code class="function">CLASS-OF</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/stagenfun_class-name.html" target="_top"><code class="function">CLASS-NAME</code></a>,
- (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_setfcm_psetf.html" target="_top"><code class="function">SETF</code></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/stagenfun_class-name.html" target="_top"><code class="function">CLASS-NAME</code></a>), <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_slot-value.html" target="_top"><code class="function">SLOT-VALUE</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_slot-boundp.html" target="_top"><code class="function">SLOT-BOUNDP</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_slot-makunbound.html" target="_top"><code class="function">SLOT-MAKUNBOUND</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_slot-exists-p.html" target="_top"><code class="function">SLOT-EXISTS-P</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/locfun_call-next-method.html" target="_top"><code class="function">CALL-NEXT-METHOD</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/locfun_next-method-p.html" target="_top"><code class="function">NEXT-METHOD-P</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/stagenfun_no-_cable-method.html" target="_top"><code class="function">NO-APPLICABLE-METHOD</code></a>, <a class="link" href="#no-prim"><code class="function">CLOS:NO-PRIMARY-METHOD</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/stagenfun_no-next-method.html" target="_top"><code class="function">NO-NEXT-METHOD</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/stagenfun_find-method.html" target="_top"><code class="function">FIND-METHOD</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/stagenfun_add-method.html" target="_top"><code class="function">ADD-METHOD</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/stagenfun_remove-method.html" target="_top"><code class="function">REMOVE-METHOD</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/stagenfun_com_able-methods.html" target="_top"><code class="function">COMPUTE-APPLICABLE-METHODS</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/stagenfun_met_d-qualifiers.html" target="_top"><code class="function">METHOD-QUALIFIERS</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/stagenfun_fun_ion-keywords.html" target="_top"><code class="function">FUNCTION-KEYWORDS</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/stagenfun_slot-missing.html" target="_top"><code class="function">SLOT-MISSING</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/stagenfun_slot-unbound.html" target="_top"><code class="function">SLOT-UNBOUND</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/stagenfun_print-object.html" target="_top"><code class="function">PRINT-OBJECT</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/stagenfun_describe-object.html" target="_top"><code class="function">DESCRIBE-OBJECT</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/stagenfun_make-instance.html" target="_top"><code class="function">MAKE-INSTANCE</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/stagenfun_ini_ize-instance.html" target="_top"><code class="function">INITIALIZE-INSTANCE</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/stagenfun_rei_ize-instance.html" target="_top"><code class="function">REINITIALIZE-INSTANCE</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/stagenfun_sha_d-initialize.html" target="_top"><code class="function">SHARED-INITIALIZE</code></a></li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.6.1</span></td><td align="left"><span class="revdate">1993-09-01</span></td><td align="left">bruno</td></tr><tr><td align="left">Release <span class="revnumber">2.7</span></td><td align="left"><span class="revdate">1993-09-27</span></td><td align="left">bruno</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li>top-level forms</li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_declaim.html" target="_top"><code class="function">DECLAIM</code></a></li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.8</span></td><td align="left"><span class="revdate">1993-11-08</span></td><td align="left">bruno</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_11-1-2-1.html" target="_top"><strong class="package">“<span class="quote">COMMON-LISP</span>”</strong></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_11-1-2-2.html" target="_top"><strong class="package">“<span class="quote">COMMON-LISP-USER</span>”</strong></a></li><li>New module: STDWIN</li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.9</span></td><td align="left"><span class="revdate">1994-01-08</span></td><td align="left">bruno</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_define-condition.html" target="_top"><code class="function">DEFINE-CONDITION</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_ignore-errors.html" target="_top"><code class="function">IGNORE-ERRORS</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_handler-case.html" target="_top"><code class="function">HANDLER-CASE</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_handler-bind.html" target="_top"><code class="function">HANDLER-BIND</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_restart-case.html" target="_top"><code class="function">RESTART-CASE</code></a>,
- <a class="link" href="#with-restarts" title="Macro EXT:WITH-RESTARTS"><code class="function">EXT:WITH-RESTARTS</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_with-simple-restart.html" target="_top"><code class="function">WITH-SIMPLE-RESTART</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_restart-bind.html" target="_top"><code class="function">RESTART-BIND</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_with-cond_ion-restarts.html" target="_top"><code class="function">WITH-CONDITION-RESTARTS</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_restart.html" target="_top"><code class="classname">RESTART</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_condition.html" target="_top"><code class="classname">CONDITION</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_serious-condition.html" target="_top"><code class="classname">SERIOUS-CONDITION</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_error.html" target="_top"><code class="classname">ERROR</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_program-error.html" target="_top"><code class="classname">PROGRAM-ERROR</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_control-error.html" target="_top"><code class="classname">CONTROL-ERROR</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_arithmetic-error.html" target="_top"><code class="classname">ARITHMETIC-ERROR</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_division-by-zero.html" target="_top"><code class="classname">DIVISION-BY-ZERO</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_floati_int-overflow.html" target="_top"><code class="classname">FLOATING-POINT-OVERFLOW</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_floati_nt-underflow.html" target="_top"><code class="classname">FLOATING-POINT-UNDERFLOW</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_cell-error.html" target="_top"><code class="classname">CELL-ERROR</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_unbound-variable.html" target="_top"><code class="classname">UNBOUND-VARIABLE</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_undefined-function.html" target="_top"><code class="classname">UNDEFINED-FUNCTION</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_type-error.html" target="_top"><code class="classname">TYPE-ERROR</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_package-error.html" target="_top"><code class="classname">PACKAGE-ERROR</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_stream-error.html" target="_top"><code class="classname">STREAM-ERROR</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_end-of-file.html" target="_top"><code class="classname">END-OF-FILE</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_file-error.html" target="_top"><code class="classname">FILE-ERROR</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_storage-condition.html" target="_top"><code class="classname">STORAGE-CONDITION</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_warning.html" target="_top"><code class="classname">WARNING</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_simple-condition.html" target="_top"><code class="classname">SIMPLE-CONDITION</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_simple-error.html" target="_top"><code class="classname">SIMPLE-ERROR</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_simple-type-error.html" target="_top"><code class="classname">SIMPLE-TYPE-ERROR</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_simple-warning.html" target="_top"><code class="classname">SIMPLE-WARNING</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_make-condition.html" target="_top"><code class="function">MAKE-CONDITION</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_signal.html" target="_top"><code class="function">SIGNAL</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_compute-restarts.html" target="_top"><code class="function">COMPUTE-RESTARTS</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_find-restart.html" target="_top"><code class="function">FIND-RESTART</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_invoke-restart.html" target="_top"><code class="function">INVOKE-RESTART</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_invoke-re_nteractively.html" target="_top"><code class="function">INVOKE-RESTART-INTERACTIVELY</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_abortcm_c_cm_use-value.html" target="_top"><code class="function">ABORT</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_abortcm_c_cm_use-value.html" target="_top"><code class="function">CONTINUE</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_abortcm_c_cm_use-value.html" target="_top"><code class="function">MUFFLE-WARNING</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_abortcm_c_cm_use-value.html" target="_top"><code class="function">STORE-VALUE</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_abortcm_c_cm_use-value.html" target="_top"><code class="function">USE-VALUE</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_invoke-debugger.html" target="_top"><code class="function">INVOKE-DEBUGGER</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_restart-name.html" target="_top"><code class="function">RESTART-NAME</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_arithmeti_or-operation.html" target="_top"><code class="function">ARITHMETIC-ERROR-OPERATION</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_arithmeti_or-operation.html" target="_top"><code class="function">ARITHMETIC-ERROR-OPERANDS</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_cell-error-name.html" target="_top"><code class="function">CELL-ERROR-NAME</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_type-erro_xpected-type.html" target="_top"><code class="function">TYPE-ERROR-DATUM</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_type-erro_xpected-type.html" target="_top"><code class="function">TYPE-ERROR-EXPECTED-TYPE</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_package-error-package.html" target="_top"><code class="function">PACKAGE-ERROR-PACKAGE</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_stream-error-stream.html" target="_top"><code class="function">STREAM-ERROR-STREAM</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_file-error-pathname.html" target="_top"><code class="function">FILE-ERROR-PATHNAME</code></a>,
- <code class="function">EXT:SIMPLE-CONDITION-FORMAT-STRING</code>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_simple-co_at-arguments.html" target="_top"><code class="function">SIMPLE-CONDITION-FORMAT-ARGUMENTS</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/var_stbreak-on-signalsst.html" target="_top"><code class="varname">*BREAK-ON-SIGNALS*</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/var_stdebugger-hookst.html" target="_top"><code class="varname">*DEBUGGER-HOOK*</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/var_stprint-readablyst.html" target="_top"><code class="varname">*PRINT-READABLY*</code></a></li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.10</span></td><td align="left"><span class="revdate">1994-06-22</span></td><td align="left">bruno</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li><a class="link" href="#rd-ch-seq"><code class="function">EXT:READ-CHAR-SEQUENCE</code></a>, <a class="link" href="#wr-ch-seq"><code class="function">EXT:WRITE-CHAR-SEQUENCE</code></a>,
- <a class="link" href="#rd-by-seq"><code class="function">EXT:READ-BYTE-SEQUENCE</code></a>, <a class="link" href="#wr-by-seq"><code class="function">EXT:WRITE-BYTE-SEQUENCE</code></a></li><li><a class="xref" href="#gstream" title="31.6. Generic streams">Section 31.6, “Generic streams”</a></li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.11</span></td><td align="left"><span class="revdate">1994-07-04</span></td><td align="left">bruno</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_loop.html" target="_top"><code class="function">LOOP</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/locmac_loop-finish.html" target="_top"><code class="function">LOOP-FINISH</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_map-into.html" target="_top"><code class="function">MAP-INTO</code></a></li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_most-p_d-long-float.html" target="_top"><code class="constant">LEAST-POSITIVE-NORMALIZED-SHORT-FLOAT</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_most-p_d-long-float.html" target="_top"><code class="constant">LEAST-NEGATIVE-NORMALIZED-SHORT-FLOAT</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_most-p_d-long-float.html" target="_top"><code class="constant">LEAST-POSITIVE-NORMALIZED-SINGLE-FLOAT</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_most-p_d-long-float.html" target="_top"><code class="constant">LEAST-NEGATIVE-NORMALIZED-SINGLE-FLOAT</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_most-p_d-long-float.html" target="_top"><code class="constant">LEAST-POSITIVE-NORMALIZED-DOUBLE-FLOAT</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_most-p_d-long-float.html" target="_top"><code class="constant">LEAST-NEGATIVE-NORMALIZED-DOUBLE-FLOAT</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_most-p_d-long-float.html" target="_top"><code class="constant">LEAST-POSITIVE-NORMALIZED-LONG-FLOAT</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_most-p_d-long-float.html" target="_top"><code class="constant">LEAST-NEGATIVE-NORMALIZED-LONG-FLOAT</code></a></li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.12</span></td><td align="left"><span class="revdate">1994-08-23</span></td><td align="left">bruno</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li>generational <a href="impnotes.html#gc" class="olink">garbage-collect</a>ion</li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_destructuring-bind.html" target="_top"><code class="function">DESTRUCTURING-BIND</code></a></li><li><a class="link" href="#uncompile" title="25.2.2. Function EXT:UNCOMPILE"><code class="function">EXT:UNCOMPILE</code></a></li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.12.1</span></td><td align="left"><span class="revdate">1994-09-01</span></td><td align="left">bruno</td></tr><tr><td align="left">Release <span class="revnumber">2.13</span></td><td align="left"><span class="revdate">1994-10-26</span></td><td align="left">bruno</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_wild-pathname-p.html" target="_top"><code class="function">WILD-PATHNAME-P</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_pathname-match-p.html" target="_top"><code class="function">PATHNAME-MATCH-P</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_translate-pathname.html" target="_top"><code class="function">TRANSLATE-PATHNAME</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_logical-pathname.html" target="_top"><code class="function">LOGICAL-PATHNAME</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/acc_logical-p_translations.html" target="_top"><code class="function">LOGICAL-PATHNAME-TRANSLATIONS</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_translate_cal-pathname.html" target="_top"><code class="function">TRANSLATE-LOGICAL-PATHNAME</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_load-logi_translations.html" target="_top"><code class="function">LOAD-LOGICAL-PATHNAME-TRANSLATIONS</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_compile-file-pathname.html" target="_top"><code class="function">COMPILE-FILE-PATHNAME</code></a>
- </li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.13.1</span></td><td align="left"><span class="revdate">1995-01-01</span></td><td align="left">bruno</td></tr><tr><td align="left">Release <span class="revnumber">2.14</span></td><td align="left"><span class="revdate">1995-04-04</span></td><td align="left">bruno</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li><a class="link" href="#dffi" title="32.3. The Foreign Function Call Facility"><strong class="package">“<span class="quote">FFI</span>”</strong></a></li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/acc_row-major-aref.html" target="_top"><code class="function">ROW-MAJOR-AREF</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_delete-package.html" target="_top"><code class="function">DELETE-PACKAGE</code></a>,
- <a class="link" href="#muffle-cerrors" title="Macro EXT:MUFFLE-CERRORS"><code class="function">EXT:MUFFLE-CERRORS</code></a>, <a href="impnotes.html#appease-cerrors" class="olink"><code class="function">EXT:APPEASE-CERRORS</code></a>, <a href="impnotes.html#exit-on-error" class="olink"><code class="function">EXT:EXIT-ON-ERROR</code></a></li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.15</span></td><td align="left"><span class="revdate">1995-04-25</span></td><td align="left">bruno</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li>New modules: <span class="module"><a class="filename" href="#wildcard" title="33.15. The Wildcard Module"><code class="filename">wildcard</code></a></span>,
- <span class="module"><a class="filename" href="#regexp-mod" title="33.3. POSIX Regular Expressions"><code class="filename">regexp</code></a></span></li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_formatter.html" target="_top"><code class="function">FORMATTER</code></a>, <a class="link" href="#final" title="31.8. Finalization"><code class="function">EXT:FINALIZE</code></a></li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_file-stream.html" target="_top"><code class="classname">FILE-STREAM</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_synonym-stream.html" target="_top"><code class="classname">SYNONYM-STREAM</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_broadcast-stream.html" target="_top"><code class="classname">BROADCAST-STREAM</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_concatenated-stream.html" target="_top"><code class="classname">CONCATENATED-STREAM</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_two-way-stream.html" target="_top"><code class="classname">TWO-WAY-STREAM</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_echo-stream.html" target="_top"><code class="classname">ECHO-STREAM</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_string-stream.html" target="_top"><code class="classname">STRING-STREAM</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_open-stream-p.html" target="_top"><code class="function">OPEN-STREAM-P</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_synonym-stream-symbol.html" target="_top"><code class="function">SYNONYM-STREAM-SYMBOL</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_broadcast_ream-streams.html" target="_top"><code class="function">BROADCAST-STREAM-STREAMS</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_concatena_ream-streams.html" target="_top"><code class="function">CONCATENATED-STREAM-STREAMS</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_two-way-s_utput-stream.html" target="_top"><code class="function">TWO-WAY-STREAM-INPUT-STREAM</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_two-way-s_utput-stream.html" target="_top"><code class="function">TWO-WAY-STREAM-OUTPUT-STREAM</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_echo-stre_utput-stream.html" target="_top"><code class="function">ECHO-STREAM-INPUT-STREAM</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_echo-stre_utput-stream.html" target="_top"><code class="function">ECHO-STREAM-OUTPUT-STREAM</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_print-not-readable.html" target="_top"><code class="classname">PRINT-NOT-READABLE</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_print-not_dable-object.html" target="_top"><code class="function">PRINT-NOT-READABLE-OBJECT</code></a></li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.16</span></td><td align="left"><span class="revdate">1995-06-23</span></td><td align="left">bruno</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_complement.html" target="_top"><code class="function">COMPLEMENT</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_with-stan_rd-io-syntax.html" target="_top"><code class="function">WITH-STANDARD-IO-SYNTAX</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/dec_dynamic-extent.html" target="_top"><code class="literal">DYNAMIC-EXTENT</code></a>, λ,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/dec_ignorecm_ignorable.html" target="_top"><code class="literal">IGNORABLE</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_constantly.html" target="_top"><code class="function">CONSTANTLY</code></a></li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_with-hash_ble-iterator.html" target="_top"><code class="function">WITH-HASH-TABLE-ITERATOR</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_hash-table-rehash-size.html" target="_top"><code class="function">HASH-TABLE-REHASH-SIZE</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_hash-tabl_sh-threshold.html" target="_top"><code class="function">HASH-TABLE-REHASH-THRESHOLD</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_hash-table-size.html" target="_top"><code class="function">HASH-TABLE-SIZE</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_hash-table-test.html" target="_top"><code class="function">HASH-TABLE-TEST</code></a></li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.17</span></td><td align="left"><span class="revdate">1996-07-21</span></td><td align="left">bruno</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li><a class="link" href="#sose"><code class="function">SOCKET:SOCKET-SERVER</code></a>, <a class="link" href="#sose-close"><code class="function">SOCKET:SOCKET-SERVER-CLOSE</code></a>,
- <a class="link" href="#sose-hopo"><code class="function">SOCKET:SOCKET-SERVER-PORT</code></a>, <a class="link" href="#so-wait"><code class="function">SOCKET:SOCKET-WAIT</code></a>, <a class="link" href="#so-accept"><code class="function">SOCKET:SOCKET-ACCEPT</code></a>, <a class="link" href="#so-connect"><code class="function">SOCKET:SOCKET-CONNECT</code></a>, <a class="link" href="#sost-hopo"><code class="function">SOCKET:SOCKET-STREAM-HOST</code></a>,
- <a class="link" href="#sost-hopo"><code class="function">SOCKET:SOCKET-STREAM-PORT</code></a>, <code class="function">SOCKET:SOCKET-SERVICE-PORT</code>,
- <a class="link" href="#sost-peer"><code class="function">SOCKET:SOCKET-STREAM-PEER</code></a></li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.17</span></td><td align="left"><span class="revdate">1996-07-22</span></td><td align="left">bruno</td></tr><tr><td align="left">Release <span class="revnumber">2.18</span></td><td align="left"><span class="revdate">1997-05-03</span></td><td align="left">bruno</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li><a class="link" href="#deflang"><code class="function">I18N:DEFLANGUAGE</code></a>, <a class="link" href="#def-i-l"><code class="function">I18N:DEFINTERNATIONAL</code></a>, <a class="link" href="#defloc"><code class="function">I18N:DEFLOCALIZED</code></a></li><li><a href="impnotes.html#loadfile" class="olink"><code class="varname">CUSTOM:*LOAD-COMPILING*</code></a></li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.19</span></td><td align="left"><span class="revdate">1997-08-07</span></td><td align="left">bruno</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li><a class="ulink" href="http://www.cliki.net/CLX" target="_top"><span class="command"><strong>CLX</strong></span></a></li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.20</span></td><td align="left"><span class="revdate">1997-09-25</span></td><td align="left">bruno</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/var_stread-evalst.html" target="_top"><code class="varname">*READ-EVAL*</code></a></li><li><a class="link" href="#time" title="25.2.8. Macro TIME"><code class="function">EXT:TIMES</code></a></li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.20.1</span></td><td align="left"><span class="revdate">1997-12-06</span></td><td align="left">bruno</td></tr><tr><td align="left">Release <span class="revnumber">2.21</span></td><td align="left"><span class="revdate">1998-09-09</span></td><td align="left">bruno</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li>Removed module STDWIN.</li><li><a class="link" href="#warn-fpc" title="Variable CUSTOM:*WARN-ON-FLOATING-POINT-CONTAGION*"><code class="varname">CUSTOM:*WARN-ON-FLOATING-POINT-CONTAGION*</code></a>, <a class="link" href="#flocont" title="12.2.3.1. Rule of Float Precision Contagion [CLHS-12.1.4.4]"><code class="varname">CUSTOM:*FLOATING-POINT-CONTAGION-ANSI*</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_floati_oint-inexact.html" target="_top"><code class="classname">FLOATING-POINT-INEXACT</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_floati_id-operation.html" target="_top"><code class="classname">FLOATING-POINT-INVALID-OPERATION</code></a></li><li><a class="link" href="#probe-dir" title="Function EXT:PROBE-DIRECTORY"><code class="function">EXT:PROBE-DIRECTORY</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_ensure-di_tories-exist.html" target="_top"><code class="function">ENSURE-DIRECTORIES-EXIST</code></a></li><li> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/var_stprint-right-marginst.html" target="_top"><code class="varname">*PRINT-RIGHT-MARGIN*</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_array-displacement.html" target="_top"><code class="function">ARRAY-DISPLACEMENT</code></a>,</li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_boolean.html" target="_top"><code class="classname">BOOLEAN</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_copy-structure.html" target="_top"><code class="function">COPY-STRUCTURE</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_generic-function.html" target="_top"><code class="classname">GENERIC-FUNCTION</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/cla_structure-object.html" target="_top"><code class="classname">STRUCTURE-OBJECT</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_class.html" target="_top"><code class="classname">CLASS</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_method.html" target="_top"><code class="classname">METHOD</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_special-operator-p.html" target="_top"><code class="function">SPECIAL-OPERATOR-P</code></a></li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.22</span></td><td align="left"><span class="revdate">1999-01-08</span></td><td align="left">bruno</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_base-char.html" target="_top"><code class="classname">BASE-CHAR</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_extended-char.html" target="_top"><code class="classname">EXTENDED-CHAR</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_base-string.html" target="_top"><code class="classname">BASE-STRING</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_simple-base-string.html" target="_top"><code class="classname">SIMPLE-BASE-STRING</code></a></li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_get-setf-expansion.html" target="_top"><code class="function">GET-SETF-EXPANSION</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_define-setf-expander.html" target="_top"><code class="function">DEFINE-SETF-EXPANDER</code></a></li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_parse-error.html" target="_top"><code class="classname">PARSE-ERROR</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_reader-error.html" target="_top"><code class="classname">READER-ERROR</code></a></li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_unbound-slot-instance.html" target="_top"><code class="function">UNBOUND-SLOT-INSTANCE</code></a></li><li><a class="link" href="#sost-local"><code class="function">SOCKET:SOCKET-STREAM-LOCAL</code></a>, <a class="link" href="#sose-hopo"><code class="function">SOCKET:SOCKET-SERVER-HOST</code></a></li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.23</span></td><td align="left"><span class="revdate">1999-07-22</span></td><td align="left">bruno</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li>New module:
- <span class="module"><a class="filename" href="#postgresql" title="33.8. PostgreSQL Database Access"><code class="filename">postgresql</code></a></span></li><li><a class="ulink" href="http://www.unicode.org/" target="_top"><span class="platform">UNICODE</span></a>, <a class="link" href="#encoding" title="31.5. Encodings"><strong class="package">“<span class="quote">CHARSET</span>”</strong></a>, <a href="impnotes.html#def-file-enc" class="olink"><code class="varname">CUSTOM:*DEFAULT-FILE-ENCODING*</code></a>, <a href="impnotes.html#path-enc" class="olink"><code class="varname">CUSTOM:*PATHNAME-ENCODING*</code></a>,
- <a href="impnotes.html#term-enc" class="olink"><code class="varname">CUSTOM:*TERMINAL-ENCODING*</code></a>, <a href="impnotes.html#misc-enc" class="olink"><code class="varname">CUSTOM:*MISC-ENCODING*</code></a> <a href="impnotes.html#foreign-enc" class="olink"><code class="varname">CUSTOM:*FOREIGN-ENCODING*</code></a>,
- <code class="varname">AFFI:*FOREIGN-ENCODING*</code></li><li><a class="xref" href="#gray" title="Chapter 30. Gray streams">Chapter 30, <i>Gray streams</i></a></li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_stream-external-format.html" target="_top"><code class="function">STREAM-EXTERNAL-FORMAT</code></a></li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_with-package-iterator.html" target="_top"><code class="function">WITH-PACKAGE-ITERATOR</code></a></li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/stagenfun_all_ate-instance.html" target="_top"><code class="function">ALLOCATE-INSTANCE</code></a></li><li><a class="xref" href="#weak-pointer" title="31.7.1. Weak Pointers">Section 31.7.1, “Weak Pointers”</a></li><li><a class="link" href="#bin-input" title="21.3.3. Binary input, READ-BYTE, EXT:READ-INTEGER & EXT:READ-FLOAT"><code class="function">EXT:READ-INTEGER</code></a>, <a class="link" href="#bin-output" title="21.3.4. Binary output, WRITE-BYTE, EXT:WRITE-INTEGER & EXT:WRITE-FLOAT"><code class="function">EXT:WRITE-INTEGER</code></a></li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_simple-co_at-arguments.html" target="_top"><code class="function">SIMPLE-CONDITION-FORMAT-CONTROL</code></a></li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.24</span></td><td align="left"><span class="revdate">2000-03-06</span></td><td align="left">bruno</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li><a class="link" href="#bin-input" title="21.3.3. Binary input, READ-BYTE, EXT:READ-INTEGER & EXT:READ-FLOAT"><code class="function">EXT:READ-FLOAT</code></a>,
- <a class="link" href="#bin-output" title="21.3.4. Binary output, WRITE-BYTE, EXT:WRITE-INTEGER & EXT:WRITE-FLOAT"><code class="function">EXT:WRITE-FLOAT</code></a></li><li><a class="link" href="#char-width" title="13.11.3. Function EXT:CHAR-WIDTH"><code class="function">EXT:CHAR-WIDTH</code></a>, <a class="link" href="#string-width" title="16.1.2. Function EXT:STRING-WIDTH"><code class="function">EXT:STRING-WIDTH</code></a></li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_with-compilation-unit.html" target="_top"><code class="function">WITH-COMPILATION-UNIT</code></a></li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.25</span></td><td align="left"><span class="revdate">2001-03-15</span></td><td align="left">sds</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_inspect.html" target="_top"><code class="function">INSPECT</code></a>,
- <code class="function">EXT:CLHS</code></li><li><a class="link" href="#string-byte" title="31.5.7. Converting between strings and byte vectors"><code class="function">EXT:CONVERT-STRING-FROM-BYTES</code></a>,
- <a class="link" href="#string-byte" title="31.5.7. Converting between strings and byte vectors"><code class="function">EXT:CONVERT-STRING-TO-BYTES</code></a></li><li><a class="link" href="#rbla"><code class="function">EXT:READ-BYTE-LOOKAHEAD</code></a>, <a class="link" href="#st-rbla"><code class="function">GRAY:STREAM-READ-BYTE-LOOKAHEAD</code></a>, <a class="link" href="#rbwhp"><code class="function">EXT:READ-BYTE-WILL-HANG-P</code></a>, <a class="link" href="#rbwhp"><code class="function">GRAY:STREAM-READ-BYTE-WILL-HANG-P</code></a>, <a class="link" href="#rbnh"><code class="function">EXT:READ-BYTE-NO-HANG</code></a>,
- <a class="link" href="#rbnh"><code class="function">GRAY:STREAM-READ-BYTE-NO-HANG</code></a></li><li><a class="ulink" href="http://winehq.com/" target="_top"><span class="platform">Win32</span></a> improvements (UNC pathnames, registry,
- screen)</li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.25.1</span></td><td align="left"><span class="revdate">2001-04-06</span></td><td align="left">sds</td></tr><tr><td align="left">Release <span class="revnumber">2.26</span></td><td align="left"><span class="revdate">2001-05-23</span></td><td align="left">sds</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li>dropped CLtL1,
- added <code class="constant">:LISP=CL</code> to <a href="impnotes.html#features" class="olink"><code class="varname">*FEATURES*</code></a></li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_define-compiler-macro.html" target="_top"><code class="function">DEFINE-COMPILER-MACRO</code></a></li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_upgraded-_ex-part-type.html" target="_top"><code class="function">UPGRADED-COMPLEX-PART-TYPE</code></a></li><li><a class="link" href="#run-prog"><code class="function">EXT:RUN-SHELL-COMMAND</code></a>, <a class="link" href="#run-prog"><code class="function">EXT:RUN-PROGRAM</code></a> accept <code class="constant">:WAIT</code></li><li>compiler checks function call signatures
- </li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.27</span></td><td align="left"><span class="revdate">2001-07-17</span></td><td align="left">sds</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_setfcm_psetf.html" target="_top"><code class="function">SETF</code></a> <a class="link" href="#getenv" title="32.7. Operating System Environment"><code class="function">EXT:GETENV</code></a>)</code></li><li><a class="clisp-cvs" href="http://clisp.cvs.sourceforge.net/*checkout*/clisp/clisp/src/install.bat"><code class="filename">src/install.bat</code></a></li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.28</span></td><td align="left"><span class="revdate">2002-03-03</span></td><td align="left">sds</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li>[<span class="citation"><a class="link" href="#ansi-cl" title="ANSI Common Lisp standard X3.226-1994 - Information Technology - Programming Language - Common Lisp">ANSI CL standard</a></span>]
- Pretty-Printer</li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/stagenfun_make-load-form.html" target="_top"><code class="function">MAKE-LOAD-FORM</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_make-load_saving-slots.html" target="_top"><code class="function">MAKE-LOAD-FORM-SAVING-SLOTS</code></a></li><li><a class="xref" href="#weak-ht" title="31.7.9. Weak Hash Tables">Section 31.7.9, “Weak Hash Tables”</a></li><li><a class="link" href="#fcase" title="5.1.2. Macro EXT:FCASE"><code class="function">EXT:FCASE</code></a></li><li><a class="link" href="#gettext"><code class="function">I18N:GETTEXT</code></a></li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.29</span></td><td align="left"><span class="revdate">2002-07-25</span></td><td align="left">bruno</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li>Bug-fix/portability:
- <a class="ulink" href="http://gcc.gnu.org/" target="_top"><span class="command"><strong>gcc</strong></span></a> 3.1 etc</li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.30</span></td><td align="left"><span class="revdate">2002-09-15</span></td><td align="left">sds</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li>Do not bundle
- <a class="ulink" href="http://www.gnu.org" target="_top">GNU</a> <a class="ulink" href="http://www.gnu.org/software/libiconv/" target="_top">libiconv</a>, <a class="ulink" href="http://www.gnu.org" target="_top">GNU</a> <a class="ulink" href="http://www.gnu.org/software/gettext/gettext.html" target="_top">gettext</a>, <a class="ulink" href="http://www.gnu.org" target="_top">GNU</a> <a class="ulink" href="http://cnswww.cns.cwru.edu/~chet/readline/rltop.html" target="_top">readline</a>, <a class="ulink" href="http://www.gnu.org" target="_top">GNU</a> <a class="ulink" href="http://libsigsegv.sourceforge.net/" target="_top">libsigsegv</a>.</li><li><a class="link" href="#charset-UCS-4"><code class="constant">CHARSET:UCS-4</code></a></li><li><a class="link" href="#name-type-split" title="Name/type namestring split"><code class="varname">CUSTOM:*PARSE-NAMESTRING-DOT-FILE*</code></a></li><li><a class="link" href="#sost-shut"><code class="function">SOCKET:SOCKET-STREAM-SHUTDOWN</code></a></li><li><a class="link" href="#stream-lock"><code class="function">POSIX:STREAM-LOCK</code></a>, <a class="link" href="#copy-file"><code class="function">POSIX:COPY-FILE</code></a>,
- <a class="link" href="#dup-handle"><code class="function">POSIX:DUPLICATE-HANDLE</code></a></li><li>New module: <span class="module"><a class="filename" href="#oracle" title="33.9. Oracle Interface"><code class="filename">oracle</code></a></span></li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.31</span></td><td align="left"><span class="revdate">2003-09-01</span></td><td align="left">sds</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li>New modules:
- <span class="module"><a class="filename" href="#fastcgi" title="33.18. The FastCGI Interface"><code class="filename">fastcgi</code></a></span>, <span class="module"><a class="filename" href="#dir-key" title="33.7. Directory Access"><code class="filename">dirkey</code></a></span>, <span class="module"><a href="http://clisp.cvs.sourceforge.net/clisp/clisp/modules/bindings/win32/"><code class="filename">bindings/win32</code></a></span>,
- <span class="module"><a class="filename" href="#syscalls" title="33.1. System Calls"><code class="filename">syscalls</code></a></span>, <span class="module"><a class="filename" href="#netica" title="33.13. Netica Interface"><code class="filename">netica</code></a></span></li><li>Support modules on <a class="ulink" href="http://winehq.com/" target="_top"><span class="platform">Win32</span></a>.</li><li><a class="ulink" href="http://www.unicode.org/" target="_top"><span class="platform">UNICODE</span></a> 3.2</li><li>New backquote implementation.</li><li>Many [<span class="citation"><a class="link" href="#ansi-cl" title="ANSI Common Lisp standard X3.226-1994 - Information Technology - Programming Language - Common Lisp">ANSI CL standard</a></span>] compliance fixes.</li><li>More <a class="link" href="#dffi" title="32.3. The Foreign Function Call Facility"><strong class="package">“<span class="quote">FFI</span>”</strong></a> functionality.</li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.32</span></td><td align="left"><span class="revdate">2003-12-29</span></td><td align="left">sds</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li>support
- <a class="ulink" href="http://www.unix.org/version2/whatsnew/lfs.html" target="_top"><span class="platform">LFS</span></a></li><li>New modules: <span class="module"><a class="filename" href="#berkeley-db" title="33.6. Berkeley DB access"><code class="filename">berkeley-db</code></a></span>,
- <span class="module"><a class="filename" href="#pcre" title="33.14. Perl Compatible Regular Expressions"><code class="filename">pcre</code></a></span></li></ul></div>
- </td></tr><tr><td align="left">Release <span class="revnumber">2.33</span></td><td align="left"><span class="revdate">2004-03-17</span></td><td align="left">sds</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li><a class="link" href="#apropos" title="25.2.12. Functions APROPOS & APROPOS-LIST"><code class="varname">CUSTOM:*APROPOS-MATCHER*</code></a>,
- <a class="link" href="#mod-expt" title="Function EXT:MOD-EXPT"><code class="function">EXT:MOD-EXPT</code></a>, <a class="link" href="#argv" title="25.2.15. Function EXT:ARGV"><code class="function">EXT:ARGV</code></a> <a class="link" href="#st-position"><code class="function">GRAY:STREAM-POSITION</code></a></li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_define-me_-combination.html" target="_top"><code class="function">DEFINE-METHOD-COMBINATION</code></a>,</li><li>Portability: removed <a class="ulink" href="http://www.acorn.com/" target="_top"><span class="platform">Acorn</span></a> and <a class="ulink" href="http://www.amiga.org/" target="_top"><span class="platform">Amiga</span></a> support,
- fixed UNIXes.</li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.33.1</span></td><td align="left"><span class="revdate">2004-05-22</span></td><td align="left">sds</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li>Bug-fixes, portability:
- <a class="ulink" href="http://gcc.gnu.org/" target="_top"><span class="command"><strong>gcc</strong></span></a> 3.4</li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.33.2</span></td><td align="left"><span class="revdate">2004-06-02</span></td><td align="left">sds</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li>Portability: RedHat Fedora
- <a class="ulink" href="http://www.linux.org/" target="_top"><span class="platform">Linux</span></a>/x86</li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.34</span></td><td align="left"><span class="revdate">2005-07-20</span></td><td align="left">sds</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li><a class="xref" href="#mop-chap" title="Chapter 29. Meta-Object Protocol">Chapter 29, <i>Meta-Object Protocol</i></a></li><li><a class="xref" href="#weak" title="31.7. Weak Objects">Section 31.7, “Weak Objects”</a></li><li><a class="xref" href="#package-case" title="11.4. Package Case-Sensitivity">Section 11.4, “Package Case-Sensitivity”</a></li><li><a href="impnotes.html#global-handler" class="olink"><code class="function">EXT:SET-GLOBAL-HANDLER</code></a>,
- <a href="impnotes.html#without-global-handlers" class="olink"><code class="function">EXT:WITHOUT-GLOBAL-HANDLERS</code></a></li><li>Portability: removed <a class="ulink" href="http://www.freedos.org/" target="_top"><span class="platform">DOS</span></a> and <a class="ulink" href="http://www.os2.org/" target="_top"><span class="platform">OS/2</span></a>
- support.</li><li>New modules: <span class="module"><a class="filename" href="#matlab" title="33.12. Matlab Interface"><code class="filename">matlab</code></a></span>, <span class="module"><a class="filename" href="#rawsock" title="33.17. Raw Socket Access"><code class="filename">rawsock</code></a></span>, <span class="module"><a class="filename" href="#zlib" title="33.16. ZLIB Interface"><code class="filename">zlib</code></a></span>,
- <span class="module"><a class="filename" href="#i18n-mod" title="33.2. Internationalization of User Programs"><code class="filename">i18n</code></a></span>, <span class="module"><a class="filename" href="#pari" title="33.11. Computer Algebra System PARI"><code class="filename">pari</code></a></span>.</li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.35</span></td><td align="left"><span class="revdate">2005-08-29</span></td><td align="left">sds</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li><a class="link" href="#compiled-file-p" title="24.1.7. Function EXT:COMPILED-FILE-P [CLRFI-2]"><code class="function">EXT:COMPILED-FILE-P</code></a></li><li><a class="link" href="#char-invertcase" title="13.5.1. Function EXT:CHAR-INVERTCASE"><code class="function">EXT:CHAR-INVERTCASE</code></a>, <a class="link" href="#string-invertcase" title="16.1.3. Functions EXT:STRING-INVERTCASE and EXT:NSTRING-INVERTCASE"><code class="function">EXT:STRING-INVERTCASE</code></a>,
- <a class="link" href="#string-invertcase" title="16.1.3. Functions EXT:STRING-INVERTCASE and EXT:NSTRING-INVERTCASE"><code class="function">EXT:NSTRING-INVERTCASE</code></a></li><li><a class="link" href="#fcntl"><code class="function">POSIX:STREAM-OPTIONS</code></a></li><li>Close all <a class="unix" href="http://www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap03.html#tag_03_165">file descriptor</a>s before
- <a class="unix" href="http://www.opengroup.org/onlinepubs/007904975/functions/exec.html"><code class="function">exec</code></a>.</li></ul></div>
- </td></tr><tr><td align="left">Release <span class="revnumber">2.36</span></td><td align="left"><span class="revdate">2005-12-04</span></td><td align="left">sds</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li><a class="link" href="#open-http" title="31.11.8. Function EXT:OPEN-HTTP and macro EXT:WITH-HTTP-INPUT"><code class="function">EXT:OPEN-HTTP</code></a>, <a class="link" href="#notspec-decl" title="Declaration EXT:NOTSPECIAL"><code class="literal">EXT:NOTSPECIAL</code></a>,
- <a class="link" href="#def-c-const"><code class="function">FFI:DEF-C-CONST</code></a>, <a class="link" href="#base64"><code class="constant">BASE64</code></a>
- </li><li><a class="clisp-cvs" href="http://clisp.cvs.sourceforge.net/*checkout*/clisp/clisp/modules/new-clx/demos/koch.lisp"><code class="filename">modules/new-clx/demos/koch.lisp</code></a></li><li><a class="clisp-cvs" href="http://clisp.cvs.sourceforge.net/*checkout*/clisp/clisp/src/spvw_sigterm.d"><code class="filename">src/spvw_sigterm.d</code></a></li></ul></div>
- </td></tr><tr><td align="left">Release <span class="revnumber">2.37</span></td><td align="left"><span class="revdate">2006-01-02</span></td><td align="left">sds</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li><a class="link" href="#sose"><code class="function">SOCKET:SOCKET-SERVER</code></a> accepts
- <code class="constant">:INTERFACE</code> and <code class="constant">:BACKLOG</code>.
- </li><li>Fixed <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_setfcm_psetf.html" target="_top"><code class="function">SETF</code></a> <a class="link" href="#getenv" title="32.7. Operating System Environment"><code class="function">EXT:GETENV</code></a>)</code>.
- </li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.38</span></td><td align="left"><span class="revdate">2006-01-24</span></td><td align="left">sds</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li><a href="impnotes.html#image" class="olink"><code class="function">EXT:SAVEINITMEM</code></a> creates standalone
- executables.</li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.39</span></td><td align="left"><span class="revdate">2006-07-16</span></td><td align="left">sds</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li>Reliable stack
- overflow detection and recovery.</li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.40</span></td><td align="left"><span class="revdate">2006-09-23</span></td><td align="left">sds</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li>Keep doc string and
- <a class="link" href="#lalist" title="3.4. Lambda Lists [CLHS-3.4]">lambda list</a> in the closure object.</li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.41</span></td><td align="left"><span class="revdate">2006-10-13</span></td><td align="left">sds</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li><a class="link" href="#dffi-default-lib"><code class="function">FFI:DEFAULT-FOREIGN-LIBRARY</code></a></li><li>New module: <span class="module"><a class="filename" href="#libsvm" title="33.10. LibSVM Interface"><code class="filename">libsvm</code></a></span></li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.42</span></td><td align="left"><span class="revdate">2007-10-16</span></td><td align="left">sds</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li><a class="xref" href="#defstruct-mop" title="8.2. The structure Meta-Object Protocol.">Section 8.2, “The structure Meta-Object Protocol.”</a></li><li><a class="link" href="#rename-dir" title="Function EXT:RENAME-DIRECTORY"><code class="function">EXT:RENAME-DIRECTORY</code></a></li><li>Many additions to
- <a class="clisp-cvs" href="http://clisp.cvs.sourceforge.net/clisp/clisp/modules/new-clx/demos/"><code class="filename">modules/new-clx/demos/</code></a>
- </li><li>New modules: <span class="module"><a class="filename" href="#gtk" title="33.19. GTK Interface"><code class="filename">gtk2</code></a></span>, <span class="module"><a class="filename" href="#gdbm" title="33.5. GDBM - The GNU database manager"><code class="filename">gdbm</code></a></span></li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.43</span></td><td align="left"><span class="revdate">2007-11-18</span></td><td align="left">sds</td></tr><tr><td align="left" colspan="3"><div class="itemizedlist"><ul type="disc"><li>The <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> build process is now in compliance
- with the GNU standards.</li><li>Use <span class="command"><strong>gnulib-tool</strong></span> to sync
- with <a class="ulink" href="http://www.gnu.org" target="_top">GNU</a> <a class="ulink" href="http://www.gnu.org/software/gnulib/" target="_top">Portability Library</a>.</li></ul></div></td></tr><tr><td align="left">Release <span class="revnumber">2.44</span></td><td align="left"><span class="revdate">2008-02-02</span></td><td align="left">sds</td></tr><tr><td align="left" colspan="3"><p>Do not bundle <a class="ulink" href="http://www.gnu.org" target="_top">GNU</a> <a class="ulink" href="http://libffcall.sourceforge.net/" target="_top">libffcall</a>.</p>
- </td></tr></table></div></div><div><div class="abstract"><a id="clisp-abstract"></a><p class="title"><b>Abstract</b></p><p>This document describes the
- <a class="ulink" href="http://www.gnu.org" target="_top">GNU</a> <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> - an implementation of the [<span class="citation"><a class="link" href="#ansi-cl" title="ANSI Common Lisp standard X3.226-1994 - Information Technology - Programming Language - Common Lisp">ANSI CL standard</a></span>].</p><p>See <a href="clisp.html#bugs" class="olink">the section called “Bugs”</a> for instructions
- on how to report bugs (both in these notes and in <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> itself).</p><p>See <a href="impnotes.html#faq-help" class="olink">Q: A.1.1.5</a> for
- information on <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> support.</p></div></div></div><hr /></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="preface"><a href="#overview">Overview</a></span></dt><dt><span class="preface"><a href="#conventions">Conventions</a></span></dt><dt><span class="part"><a href="#clhs-chapters">I. Chapters or the Common Lisp HyperSpec</a></span></dt><dd><dl><dt><span class="chapter"><a href="#intro">1. Introduction
- [CLHS-1]</a></span></dt><dd><dl><dt><span class="section"><a href="#spec-symb">1.1. Special Symbols
- [CLHS-1.4.1.3]</a></span></dt><dt><span class="section"><a href="#error-terms">1.2. Error Terminology
- [CLHS-1.4.2]</a></span></dt><dt><span class="section"><a href="#cl-symb">1.3. Symbols in the Package <strong class="package">“<span class="quote">COMMON-LISP</span>”</strong>
- [CLHS-1.9]</a></span></dt></dl></dd><dt><span class="chapter"><a href="#syntax">2. Syntax
- [CLHS-2]</a></span></dt><dd><dl><dt><span class="section"><a href="#std-char">2.1. Standard Characters
- [CLHS-2.1.3]</a></span></dt><dt><span class="section"><a href="#reader-alg">2.2. Reader Algorithm
- [CLHS-2.2]</a></span></dt><dt><span class="section"><a href="#tokens">2.3. Symbols as Tokens
- [CLHS-2.3.4]</a></span></dt><dt><span class="section"><a href="#valid-patterns">2.4. Valid Patterns for Tokens
- [CLHS-2.3.5]</a></span></dt><dt><span class="section"><a href="#backquote">2.5. Backquote
- [CLHS-2.4.6]</a></span></dt><dt><span class="section"><a href="#sharpsign">2.6. Sharpsign
- [CLHS-2.4.8]</a></span></dt></dl></dd><dt><span class="chapter"><a href="#eval">3. Evaluation and Compilation
- [CLHS-3]</a></span></dt><dd><dl><dt><span class="section"><a href="#evaluation">3.1. Evaluation
- [CLHS-3.1]</a></span></dt><dt><span class="section"><a href="#compilation">3.2. Compilation
- [CLHS-3.2]</a></span></dt><dt><span class="section"><a href="#declarations">3.3. Declarations
- [CLHS-3.3]</a></span></dt><dt><span class="section"><a href="#lalist">3.4. Lambda Lists
- [CLHS-3.4]</a></span></dt><dt><span class="section"><a href="#eval-comp">3.5. The Evaluation and Compilation Dictionary
- [CLHS-3.8]</a></span></dt></dl></dd><dt><span class="chapter"><a href="#types-classes">4. Types and Classes
- [CLHS-4]</a></span></dt><dd><dl><dt><span class="section"><a href="#types">4.1. Types
- [CLHS-4.2]</a></span></dt><dt><span class="section"><a href="#classes">4.2. Classes
- [CLHS-4.3]</a></span></dt><dt><span class="section"><a href="#clos-diff">4.3. Deviations from ANSI CL standard</a></span></dt><dt><span class="section"><a href="#metaclasses">4.4. Standard Metaclasses
- [CLHS-4.3.1.1]</a></span></dt><dt><span class="section"><a href="#def-class">4.5. Defining Classes
- [CLHS-4.3.2]</a></span></dt><dt><span class="section"><a href="#redef-class">4.6. Redefining Classes
- [CLHS-4.3.6]</a></span></dt><dt><span class="section"><a href="#type-class-dict">4.7. The Types and Classes Dictionary
- [CLHS-4.4]</a></span></dt></dl></dd><dt><span class="chapter"><a href="#data">5. Data and Control Flow
- [CLHS-5]</a></span></dt><dd><dl><dt><span class="section"><a href="#flow-dict">5.1. The Data and Control Flow Dictionary
- [CLHS-5.3]</a></span></dt></dl></dd><dt><span class="chapter"><a href="#iteration">6. Iteration
- [CLHS-6]</a></span></dt><dd><dl><dt><span class="section"><a href="#loop">6.1. The LOOP Facility
- [CLHS-6.1]</a></span></dt><dt><span class="section"><a href="#iter-dict">6.2. The Iteration Dictionary
- [CLHS-6.2]</a></span></dt></dl></dd><dt><span class="chapter"><a href="#objects">7. Objects
- [CLHS-7]</a></span></dt><dd><dl><dt><span class="section"><a href="#std-meth-combo">7.1. Standard Method Combination
- [CLHS-7.6.6.2]</a></span></dt></dl></dd><dt><span class="chapter"><a href="#structures">8. Structures
- [CLHS-8]</a></span></dt><dd><dl><dt><span class="section"><a href="#defstruct-options">8.1. The options for <code class="function">DEFSTRUCT</code>.</a></span></dt><dt><span class="section"><a href="#defstruct-mop">8.2. The structure Meta-Object Protocol.</a></span></dt></dl></dd><dt><span class="chapter"><a href="#conditions">9. Conditions
- [CLHS-9]</a></span></dt><dd><dl><dt><span class="section"><a href="#cond-nl">9.1. Embedded Newlines in Condition Reports
- [CLHS-9.1.3.1.3]</a></span></dt><dt><span class="section"><a href="#cond-dict">9.2. The Conditions Dictionary
- [CLHS-9.2]</a></span></dt></dl></dd><dt><span class="chapter"><a href="#symbols">10. Symbols
- [CLHS-10]</a></span></dt><dt><span class="chapter"><a href="#packages">11. Packages
- [CLHS-11]</a></span></dt><dd><dl><dt><span class="section"><a href="#pack-lock">11.1. Constraints on the <strong class="package">“<span class="quote">COMMON-LISP</span>”</strong> Package
- for Conforming Programs - package locking
- [CLHS-11.1.2.1.2]</a></span></dt><dt><span class="section"><a href="#clupack">11.2. The
- COMMON-LISP-USER Package
- [CLHS-11.1.2.2]</a></span></dt><dt><span class="section"><a href="#imppack">11.3. Implementation-Defined Packages
- [CLHS-11.1.2.4]</a></span></dt><dt><span class="section"><a href="#package-case">11.4. Package Case-Sensitivity</a></span></dt><dt><span class="section"><a href="#pack-dict">11.5. The Packages Dictionary
- [CLHS-11.2]</a></span></dt></dl></dd><dt><span class="chapter"><a href="#numbers">12. Numbers
- [CLHS-12]</a></span></dt><dd><dl><dt><span class="section"><a href="#num-types">12.1. Numeric Types</a></span></dt><dt><span class="section"><a href="#num-concepts">12.2. Number Concepts
- [CLHS-12.1]</a></span></dt><dt><span class="section"><a href="#num-dict">12.3. The Numbers Dictionary
- [CLHS-12.2]</a></span></dt></dl></dd><dt><span class="chapter"><a href="#characters">13. Characters
- [CLHS-13]</a></span></dt><dd><dl><dt><span class="section"><a href="#char-script">13.1. Character Scripts
- [CLHS-13.1.2.1]</a></span></dt><dt><span class="section"><a href="#char-attrib">13.2. Character Attributes
- [CLHS-13.1.3]</a></span></dt><dt><span class="section"><a href="#graph-char">13.3. Graphic Characters
- [CLHS-13.1.4.1]</a></span></dt><dt><span class="section"><a href="#alpha-char">13.4. Alphabetic Characters
- [CLHS-13.1.4.2]</a></span></dt><dt><span class="section"><a href="#char-case">13.5. Characters With Case
- [CLHS-13.1.4.3]</a></span></dt><dt><span class="section"><a href="#num-char">13.6. Numeric Characters
- [CLHS-13.1.4.4]</a></span></dt><dt><span class="section"><a href="#char-ord">13.7. Ordering of Characters
- [CLHS-13.1.6]</a></span></dt><dt><span class="section"><a href="#clhs-newline">13.8. Treatment of Newline during Input and Output
- [CLHS-13.1.8]</a></span></dt><dt><span class="section"><a href="#char-int">13.9. Character Encodings
- [CLHS-13.1.9]</a></span></dt><dt><span class="section"><a href="#script-ext">13.10. Documentation
- of Implementation-Defined Scripts
- [CLHS-13.1.10]</a></span></dt><dt><span class="section"><a href="#char-dict">13.11. The Characters Dictionary
- [CLHS-13.2]</a></span></dt><dt><span class="section"><a href="#char-platform-dep">13.12. Platform-Dependent Characters</a></span></dt><dt><span class="section"><a href="#char-bits">13.13. Obsolete Constants</a></span></dt></dl></dd><dt><span class="chapter"><a href="#conses">14. Conses
- [CLHS-14]</a></span></dt><dd><dl><dt><span class="section"><a href="#cons-dict">14.1. The Conses Dictionary
- [CLHS-14.2]</a></span></dt></dl></dd><dt><span class="chapter"><a href="#arrays">15. Arrays
- [CLHS-15]</a></span></dt><dd><dl><dt><span class="section"><a href="#array-elts">15.1. Array Elements
- [CLHS-15.1.1]</a></span></dt><dt><span class="section"><a href="#array-dict">15.2. The Arrays Dictionary
- [CLHS-15.2]</a></span></dt></dl></dd><dt><span class="chapter"><a href="#strings">16. Strings
- [CLHS-16]</a></span></dt><dd><dl><dt><span class="section"><a href="#string-dict">16.1. The Strings Dictionary
- [CLHS-16.2]</a></span></dt></dl></dd><dt><span class="chapter"><a href="#sequences">17. Sequences
- [CLHS-17]</a></span></dt><dd><dl><dt><span class="section"><a href="#seq-dict">17.1. The Sequences Dictionary
- [CLHS-17.3]</a></span></dt></dl></dd><dt><span class="chapter"><a href="#hash">18. Hash Tables
- [CLHS-18]</a></span></dt><dd><dl><dt><span class="section"><a href="#hash-dict">18.1. The Hash Tables Dictionary
- [CLHS-18.2]</a></span></dt></dl></dd><dt><span class="chapter"><a href="#filenames">19. Filenames
- [CLHS-19]</a></span></dt><dd><dl><dt><span class="section"><a href="#path-components">19.1. Pathname Components
- [CLHS-19.2.1]</a></span></dt><dt><span class="section"><a href="#unspecific">19.2. :UNSPECIFIC as a Component Value
- [CLHS-19.2.2.2.3]</a></span></dt><dt><span class="section"><a href="#path-external-notation">19.3. External notation</a></span></dt><dt><span class="section"><a href="#log-path">19.4. Logical Pathnames
- [CLHS-19.3]</a></span></dt><dt><span class="section"><a href="#filename-dict">19.5. The Filenames Dictionary
- [CLHS-19.4]</a></span></dt></dl></dd><dt><span class="chapter"><a href="#files">20. Files
- [CLHS-20]</a></span></dt><dd><dl><dt><span class="section"><a href="#file-dict">20.1. The Files Dictionary
- [CLHS-20.2]</a></span></dt></dl></dd><dt><span class="chapter"><a href="#streams">21. Streams
- [CLHS-21]</a></span></dt><dd><dl><dt><span class="section"><a href="#streams-interactive">21.1. Interactive Streams
- [CLHS-21.1.1.1.3]</a></span></dt><dt><span class="section"><a href="#terminal">21.2. Terminal interaction</a></span></dt><dt><span class="section"><a href="#stream-dict">21.3. The Streams Dictionary
- [CLHS-21.2]</a></span></dt></dl></dd><dt><span class="chapter"><a href="#printer">22. Printer
- [CLHS-22]</a></span></dt><dd><dl><dt><span class="section"><a href="#multi-rep">22.1. Multiple Possible Textual Representations
- [CLHS-22.1.1.1]</a></span></dt><dt><span class="section"><a href="#spacecharprint">22.2. Printing Characters
- [CLHS-22.1.3.2]</a></span></dt><dt><span class="section"><a href="#sym-pack-prefix">22.3. Package Prefixes for Symbols
- [CLHS-22.1.3.3.1]</a></span></dt><dt><span class="section"><a href="#print-vector">22.4. Printing Other Vectors
- [CLHS-22.1.3.7]</a></span></dt><dt><span class="section"><a href="#print-array">22.5. Printing Other Arrays
- [CLHS-22.1.3.8]</a></span></dt><dt><span class="section"><a href="#clpp">22.6. The Lisp Pretty Printer
- [CLHS-22.2]</a></span></dt><dt><span class="section"><a href="#print-formatted">22.7. Formatted Output
- [CLHS-22.3]</a></span></dt><dt><span class="section"><a href="#print-dict">22.8. The Printer Dictionary
- [CLHS-22.4]</a></span></dt></dl></dd><dt><span class="chapter"><a href="#reader">23. Reader
- [CLHS-23]</a></span></dt><dd><dl><dt><span class="section"><a href="#rt-case">23.1. Effect of Readtable Case on the Lisp Reader
- [CLHS-23.1.2]</a></span></dt><dt><span class="section"><a href="#recursive-p">23.2. The recursive-p argument
- [CLHS-23.1.3.2]</a></span></dt></dl></dd><dt><span class="chapter"><a href="#system">24. System Construction
- [CLHS-24]</a></span></dt><dd><dl><dt><span class="section"><a href="#system-dict">24.1. The System Construction Dictionary
- [CLHS-24.2]</a></span></dt></dl></dd><dt><span class="chapter"><a href="#environment">25. Environment
- [CLHS-25]</a></span></dt><dd><dl><dt><span class="section"><a href="#debugger">25.1. Debugging Utilities
- [CLHS-25.1.2]</a></span></dt><dt><span class="section"><a href="#environment-dict">25.2. The Environment Dictionary
- [CLHS-25.2]</a></span></dt></dl></dd><dt><span class="chapter"><a href="#glossary">26. Glossary
- [CLHS-26]</a></span></dt><dt><span class="chapter"><a href="#appendix">27. Appendix
- [CLHS-a]</a></span></dt><dt><span class="chapter"><a href="#issues">28. X3J13 Issue Index
- [CLHS-ic]</a></span></dt></dl></dd><dt><span class="part"><a href="#ext-standard">II. Common Portable Extensions</a></span></dt><dd><dl><dt><span class="chapter"><a href="#mop-chap">29. Meta-Object Protocol</a></span></dt><dd><dl><dt><span class="section"><a href="#mop-intro">29.1. Introduction</a></span></dt><dt><span class="section"><a href="#mop-overview">29.2. Overview</a></span></dt><dt><span class="section"><a href="#mop-classes">29.3. Classes</a></span></dt><dt><span class="section"><a href="#mop-sd">29.4. Slot Definitions</a></span></dt><dt><span class="section"><a href="#mop-gf">29.5. Generic Functions</a></span></dt><dt><span class="section"><a href="#mop-meth">29.6. Methods</a></span></dt><dt><span class="section"><a href="#mop-accessors">29.7. Accessor Methods</a></span></dt><dt><span class="section"><a href="#mop-specializers">29.8. Specializers</a></span></dt><dt><span class="section"><a href="#mop-meth-comb">29.9. Method Combinations</a></span></dt><dt><span class="section"><a href="#mop-slot-access">29.10. Slot Access</a></span></dt><dt><span class="section"><a href="#mop-dep-maint">29.11. Dependent Maintenance</a></span></dt><dt><span class="section"><a href="#mop-clisp">29.12. Deviations from AMOP</a></span></dt></dl></dd><dt><span class="chapter"><a href="#gray">30. Gray streams</a></span></dt><dd><dl><dt><span class="section"><a href="#gray-overview">30.1. Overview</a></span></dt><dt><span class="section"><a href="#fill-stream">30.2. Class <code class="classname">EXT:FILL-STREAM</code></a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="#ext-clisp">III. Extensions Specific to <span class="command"><strong>CLISP</strong></span></a></span></dt><dd><dl><dt><span class="chapter"><a href="#ext-p-indep">31. Platform Independent Extensions</a></span></dt><dd><dl><dt><span class="section"><a href="#custom-init-fini">31.1. Customizing <span class="command"><strong>CLISP</strong></span> Process
- Initialization and Termination</a></span></dt><dt><span class="section"><a href="#image">31.2. Saving an Image</a></span></dt><dt><span class="section"><a href="#quit">31.3. Quitting <span class="command"><strong>CLISP</strong></span></a></span></dt><dt><span class="section"><a href="#i18n">31.4. Internationalization of <span class="command"><strong>CLISP</strong></span></a></span></dt><dt><span class="section"><a href="#encoding">31.5. Encodings</a></span></dt><dt><span class="section"><a href="#gstream">31.6. Generic streams</a></span></dt><dt><span class="section"><a href="#weak">31.7. Weak Objects</a></span></dt><dt><span class="section"><a href="#final">31.8. Finalization</a></span></dt><dt><span class="section"><a href="#prompt">31.9. The Prompt</a></span></dt><dt><span class="section"><a href="#ansi">31.10. Maximum ANSI CL compliance</a></span></dt><dt><span class="section"><a href="#macros3">31.11. Additional Fancy Macros and Functions</a></span></dt><dt><span class="section"><a href="#customize">31.12. Customizing <span class="command"><strong>CLISP</strong></span> behavior</a></span></dt><dt><span class="section"><a href="#code-walk">31.13. Code Walker</a></span></dt></dl></dd><dt><span class="chapter"><a href="#ext-platform">32. Platform Specific Extensions</a></span></dt><dd><dl><dt><span class="section"><a href="#screen">32.1. Random Screen Access</a></span></dt><dt><span class="section"><a href="#modules">32.2. External Modules</a></span></dt><dt><span class="section"><a href="#dffi">32.3. The Foreign Function Call Facility</a></span></dt><dt><span class="section"><a href="#socket">32.4. Socket Streams</a></span></dt><dt><span class="section"><a href="#quickstart">32.5. Quickstarting delivery with <span class="command"><strong>CLISP</strong></span></a></span></dt><dt><span class="section"><a href="#shell">32.6. Shell, Pipes and Printing</a></span></dt><dt><span class="section"><a href="#getenv">32.7. Operating System Environment</a></span></dt></dl></dd><dt><span class="chapter"><a href="#ext-modules">33. Extensions Implemented as Modules</a></span></dt><dd><dl><dt><span class="section"><a href="#syscalls">33.1. System Calls</a></span></dt><dt><span class="section"><a href="#i18n-mod">33.2. Internationalization of User Programs</a></span></dt><dt><span class="section"><a href="#regexp-mod">33.3. POSIX Regular Expressions</a></span></dt><dt><span class="section"><a href="#readline-mod">33.4. Advanced Readline and History Functionality</a></span></dt><dt><span class="section"><a href="#gdbm">33.5. GDBM - The GNU database manager</a></span></dt><dt><span class="section"><a href="#berkeley-db">33.6. Berkeley DB access</a></span></dt><dt><span class="section"><a href="#dir-key">33.7. Directory Access</a></span></dt><dt><span class="section"><a href="#postgresql">33.8. PostgreSQL Database Access</a></span></dt><dt><span class="section"><a href="#oracle">33.9. Oracle Interface</a></span></dt><dt><span class="section"><a href="#libsvm">33.10. LibSVM Interface</a></span></dt><dt><span class="section"><a href="#pari">33.11. Computer Algebra System PARI</a></span></dt><dt><span class="section"><a href="#matlab">33.12. Matlab Interface</a></span></dt><dt><span class="section"><a href="#netica">33.13. Netica Interface</a></span></dt><dt><span class="section"><a href="#pcre">33.14. Perl Compatible Regular Expressions</a></span></dt><dt><span class="section"><a href="#wildcard">33.15. The Wildcard Module</a></span></dt><dt><span class="section"><a href="#zlib">33.16. ZLIB Interface</a></span></dt><dt><span class="section"><a href="#rawsock">33.17. Raw Socket Access</a></span></dt><dt><span class="section"><a href="#fastcgi">33.18. The FastCGI Interface</a></span></dt><dt><span class="section"><a href="#gtk">33.19. GTK Interface</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="#internals">IV. Internals of the <span class="command"><strong>CLISP</strong></span> Implementation</a></span></dt><dd><dl><dt><span class="chapter"><a href="#source-files">34. The source files of <span class="command"><strong>CLISP</strong></span></a></span></dt><dd><dl><dt><span class="section"><a href="#src-file-types">34.1. File Types</a></span></dt><dt><span class="section"><a href="#src-preprocessing">34.2. Source Pre-Processing</a></span></dt><dt><span class="section"><a href="#src-files">34.3. Files</a></span></dt></dl></dd><dt><span class="chapter"><a href="#gc">35. Overview of <span class="command"><strong>CLISP</strong></span>'s Garbage Collection</a></span></dt><dd><dl><dt><span class="section"><a href="#internals-intro">35.1. Introduction</a></span></dt><dt><span class="section"><a href="#lisp-obj-in-c">35.2. Lisp objects in <span class="command"><strong>CLISP</strong></span></a></span></dt><dt><span class="section"><a href="#typecodes">35.3. Object Pointer Representations</a></span></dt><dt><span class="section"><a href="#memory-models">35.4. Memory Models</a></span></dt><dt><span class="section"><a href="#gc-safety">35.5. The burden of garbage-collection upon the rest of <span class="command"><strong>CLISP</strong></span></a></span></dt><dt><span class="section"><a href="#foreign-pointers">35.6. Foreign Pointers</a></span></dt></dl></dd><dt><span class="chapter"><a href="#extend">36. Extending <span class="command"><strong>CLISP</strong></span></a></span></dt><dd><dl><dt><span class="section"><a href="#add-fun">36.1. Adding a built-in function</a></span></dt><dt><span class="section"><a href="#add-var">36.2. Adding a built-in variable</a></span></dt><dt><span class="section"><a href="#recompile">36.3. Recompilation</a></span></dt></dl></dd><dt><span class="chapter"><a href="#bytecode">37. The <span class="command"><strong>CLISP</strong></span> bytecode specification</a></span></dt><dd><dl><dt><span class="section"><a href="#byte-intro">37.1. Introduction</a></span></dt><dt><span class="section"><a href="#vm">37.2. The virtual machine</a></span></dt><dt><span class="section"><a href="#comp-fun">37.3. The structure of compiled functions</a></span></dt><dt><span class="section"><a href="#instr-struct">37.4. The general structure of the instructions</a></span></dt><dt><span class="section"><a href="#instr-set">37.5. The instruction set</a></span></dt><dt><span class="section"><a href="#compiler-introspection">37.6. Examining compiled closures</a></span></dt><dt><span class="section"><a href="#bytecode-design">37.7. Bytecode Design</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="#appendices">V. Appendices</a></span></dt><dd><dl><dt><span class="appendix"><a href="#faq">A. Frequently Asked Questions (With Answers)
- about <span class="command"><strong>CLISP</strong></span></a></span></dt><dt><span class="appendix"><a href="#gfdl">B. GNU Free Documentation License</a></span></dt><dt><span class="appendix"><a href="#gpl">C. GNU General Public License</a></span></dt><dd><dl><dt><span class="sect1"><a href="#gpl-1">C.1. Preamble</a></span></dt><dt><span class="sect1"><a href="#gpl-2">C.2. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</a></span></dt><dt><span class="sect1"><a href="#gpl-3">C.3. How to Apply These Terms to Your New Programs
- </a></span></dt></dl></dd></dl></dd><dt><span class="index"><a href="#idx">Index</a></span></dt><dt><span class="bibliography"><a href="#references">References</a></span></dt></dl></div><div class="list-of-figures"><p><b>List of Figures</b></p><dl><dt>29.1. <a href="#mop-mo-cl-inheritance-fig">Inheritance structure of metaobject classes</a></dt><dt>29.2. <a href="#mop-cl-Inheritance-fig">Inheritance structure of class metaobject classes</a></dt><dt>29.3. <a href="#mop-sd-inheritance-fig">Inheritance structure of slot definition metaobject classes</a></dt><dt>29.4. <a href="#mop-gf-inheritance-fig">Inheritance structure of generic function metaobject classes</a></dt><dt>29.5. <a href="#mop-meth-inheritance-fig">Inheritance structure of method metaobject classes</a></dt><dt>29.6. <a href="#mop-specializers-inheritance-fig">Inheritance structure of specializer metaobject classes</a></dt><dt>29.7. <a href="#mop-meth-comb-inheritance-fig">Inheritance structure of method combination metaobject classes</a></dt></dl></div><div class="list-of-tables"><p><b>List of Tables</b></p><dl><dt>1. <a href="#conventions-tab">Mark-up conventions</a></dt><dt>5.1. <a href="#values-limits-table">Function call limits</a></dt><dt>12.1. <a href="#bool-op-table">Boolean operations</a></dt><dt>12.2. <a href="#fixnum-lim-table">Fixnum limits</a></dt><dt>13.1. <a href="#standard-char-table">Standard characters</a></dt><dt>13.2. <a href="#semi-standard-char-table">Semi-standard characters</a></dt><dt>13.3. <a href="#extra-named-chars-table">Additional Named Characters</a></dt><dt>13.4. <a href="#ctrl-char-table">Additional syntax for characters with code from
- #x00 to #x1F:</a></dt><dt>13.5. <a href="#char-code-limit-table">Number of characters</a></dt><dt>13.6. <a href="#dos-win32-chars-table">Additional characters (<span class="platform">Win32</span> platform only.)</a></dt><dt>13.7. <a href="#unix-chars-table">Additional characters (<span class="strong"><strong>UNIX</strong></span> platform only.)</a></dt><dt>13.8. <a href="#char-bits-table">Character bit constants (obsolete)</a></dt><dt>15.1. <a href="#array-limit-table">Array limits</a></dt><dt>19.1. <a href="#min-filename-syntax-table">The minimum filename syntax that may be used portably</a></dt><dt>25.1. <a href="#debugger-main-deb-step">Commands common to the main loop, the debugger and the stepper</a></dt><dt>25.2. <a href="#debugger-deb-step">Commands common to the debugger and the stepper</a></dt><dt>25.3. <a href="#debugger-deb-step-1">Commands common to the debugger and the stepper</a></dt><dt>25.4. <a href="#debugger-eval-apply">Commands specific to <code class="function">EVAL</code>/<code class="function">APPLY</code></a></dt><dt>25.5. <a href="#debugger-deb">Commands specific to the debugger</a></dt><dt>25.6. <a href="#debugger-step">Commands specific to the stepper</a></dt><dt>25.7. <a href="#internal-time-units-table">Time granularity</a></dt><dt>29.1. <a href="#mop-inherit-struct">Direct Superclass Relationships
- Among The Specified Metaobject Classes</a></dt><dt>29.2. <a href="#class-mo-initargs">Initialization arguments and
- accessors for class metaobjects</a></dt><dt>29.3. <a href="#slotd-mo-initargs">Initialization arguments and
- accessors for slot definition metaobjects</a></dt><dt>29.4. <a href="#gf-mo-initargs">Initialization arguments and accessors
- for generic function metaobjects</a></dt><dt>29.5. <a href="#mop-meth-initargs">Initialization arguments and
- accessors for method metaobjects</a></dt><dt>29.6. <a href="#mop-sa-instance-struct-table">The correspondence between slot access function and
- underlying slot access generic function</a></dt><dt>35.1. <a href="#mem-models-comb-typecodes">Memory models with <span class="strong"><strong><code class="option">TYPECODES</code></strong></span></a></dt><dt>35.2. <a href="#mem-models-comb-heapcodes">Memory models with <span class="strong"><strong><code class="option">HEAPCODES</code></strong></span></a></dt></dl></div><div class="list-of-examples"><p><b>List of Examples</b></p><dl><dt>30.1. <a href="#ex-fill-stream">Example of <code class="classname">EXT:FILL-STREAM</code> usage</a></dt><dt>32.1. <a href="#dffi-simple">Simple declarations and access</a></dt><dt>32.2. <a href="#dffi-extern-var">external <span class="command"><strong>C</strong></span> variable and some accesses</a></dt><dt>32.3. <a href="#dffi-extern-func1">Calling an external function</a></dt><dt>32.4. <a href="#dffi-extern-func2">Another example for calling an external function</a></dt><dt>32.5. <a href="#dffi-ex-macro">Accessing <span class="command"><strong>cpp</strong></span> macros</a></dt><dt>32.6. <a href="#ex-call-in">Calling Lisp from <span class="command"><strong>C</strong></span></a></dt><dt>32.7. <a href="#ex-call-in-dll">Calling Lisp from <span class="command"><strong>C</strong></span> dynamically</a></dt><dt>32.8. <a href="#dffi-gethostname">Variable size arguments:
- calling gethostname from <span class="command"><strong>CLISP</strong></span></a></dt><dt>32.9. <a href="#dffi-dll-var">Accessing variables in shared libraries</a></dt><dt>32.10. <a href="#ex-dffi-validity">Controlling validity of resources</a></dt><dt>32.11. <a href="#ex-dffi-float">Float point array computations</a></dt><dt>32.12. <a href="#socket-ex-server">Lisp read-eval-print loop server</a></dt><dt>32.13. <a href="#socket-ex-client">Lisp <span class="command"><strong>HTTP</strong></span> client</a></dt><dt>33.1. <a href="#ex-re-match"><code class="function">REGEXP:MATCH</code></a></dt><dt>33.2. <a href="#ex-re-quote"><code class="function">REGEXP:REGEXP-QUOTE</code></a></dt></dl></div><div class="preface" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="overview"></a>Overview</h2></div></div></div><p>These notes discuss the <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> implementation of <a class="ulink" href="http://www.lisp.org" target="_top"><span class="command"><strong>Common Lisp</strong></span></a> by <span class="author"><span class="firstname">Bruno</span> <span class="surname">Haible</span></span>
- and <span class="author"><span class="firstname">Michael</span> <span class="surname">Stoll</span></span>. The current maintainers are <span class="author"><span class="firstname">Bruno</span> <span class="surname">Haible</span></span> and <span class="author"><span class="firstname">Sam</span> <span class="surname">Steingold</span></span>.</p><p>This implementation is mostly conforming to the [<span class="citation"><a class="link" href="#ansi-cl" title="ANSI Common Lisp standard X3.226-1994 - Information Technology - Programming Language - Common Lisp">ANSI CL standard</a></span>]
- available on-line as the [<span class="citation"><a class="link" href="#CLHS" title="Common Lisp HyperSpec">Common Lisp HyperSpec</a></span>] (but the printed <a class="ulink" href="http://www.ansi.org/" target="_top"><acronym class="acronym" title="The American National Standards Institute">ANSI</acronym></a> document
- remains the authoritative source of information). [<span class="citation"><a class="link" href="#ansi-cl" title="ANSI Common Lisp standard X3.226-1994 - Information Technology - Programming Language - Common Lisp">ANSI CL standard</a></span>] supersedes
- the earlier specifications <a class="xref" href="#CLtL1" title="Common Lisp: the Language (1st Edition)">[<abbr class="abbrev">CLtL1</abbr>]</a> and <a class="xref" href="#CLtL2" title="Common Lisp: the Language (2nd Edition)">[<abbr class="abbrev">CLtL2</abbr>]</a>.</p><p>The first part of these notes, <a class="xref" href="#clhs-chapters" title="Part I. Chapters or the Common Lisp HyperSpec">Part I, “Chapters or the Common Lisp HyperSpec”</a>,
- is indexed in parallel to the [<span class="citation"><a class="link" href="#CLHS" title="Common Lisp HyperSpec">Common Lisp HyperSpec</a></span>] and documents how <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a>
- implements the standard [<span class="citation"><a class="link" href="#ansi-cl" title="ANSI Common Lisp standard X3.226-1994 - Information Technology - Programming Language - Common Lisp">ANSI CL standard</a></span>].</p><p>The second part, <a class="xref" href="#ext-standard" title="Part II. Common Portable Extensions">Part II, “Common Portable Extensions”</a>, documents the
- common extensions to the [<span class="citation"><a class="link" href="#ansi-cl" title="ANSI Common Lisp standard X3.226-1994 - Information Technology - Programming Language - Common Lisp">ANSI CL standard</a></span>], specifically <a class="link" href="#mop-chap" title="Chapter 29. Meta-Object Protocol">Meta-Object Protocol</a> and <a class="link" href="#gray" title="Chapter 30. Gray streams"><strong class="package">“<span class="quote">GRAY</span>”</strong></a>
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_stream.html" target="_top"><code class="classname">STREAM</code></a>s.</p><p>The third part, <a class="xref" href="#ext-clisp" title="Part III. Extensions Specific to CLISP">Part III, “Extensions Specific to <span class="command"><strong>CLISP</strong></span>”</a>, documents the
- <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a>-specific extensions, e.g., <a class="xref" href="#socket" title="32.4. Socket Streams">Section 32.4, “Socket Streams”</a>.</p><p>The fourth part, <a class="xref" href="#internals" title="Part IV. Internals of the CLISP Implementation">Part IV, “Internals of the <span class="command"><strong>CLISP</strong></span> Implementation”</a>, is intended mostly
- for developers as it documents the <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> internals, e.g., <a href="impnotes.html#gc" class="olink">garbage-collect</a>ion,
- adding new built-ins, and the <a href="impnotes.html#bytecode" class="olink">bytecode</a>s generated by the compiler
- (i.e., what is printed by <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_disassemble.html" target="_top"><code class="function">DISASSEMBLE</code></a>).</p></div><div class="preface" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="conventions"></a>Conventions</h2></div></div></div><p>The following is the mark-up notations used in this document:
- </p><div class="table"><a id="conventions-tab"></a><p class="title"><b>Table 1. Mark-up conventions</b></p><div class="table-contents"><table summary="Mark-up conventions" border="1"><colgroup><col /><col /></colgroup><thead><tr><th align="center">Object Kind</th><th align="center">Example</th></tr></thead><tbody><tr><td align="center">Function</td><td align="center"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/acc_carcm_cdr_darcm_cddddr.html" target="_top"><code class="function">CAR</code></a></td></tr><tr><td align="center">Variable</td><td align="center"><a class="link" href="#load-paths" title="Variable CUSTOM:*LOAD-PATHS*"><code class="varname">CUSTOM:*LOAD-PATHS*</code></a></td></tr><tr><td align="center">Formal Argument</td><td align="center"><em class="replaceable"><code>x</code></em></td></tr><tr><td align="center">Keyword</td><td align="center"><code class="constant">:EOF</code></td></tr><tr><td align="center">Number</td><td align="center"><code class="literal">0</code></td></tr><tr><td align="center">Character</td><td align="center"><span class="keysym">#\Newline</span></td></tr><tr><td align="center">Class, type</td><td align="center"><code class="classname">REGEXP:MATCH</code></td></tr><tr><td align="center">Format instruction</td><td align="center"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_22-3-4-1.html" target="_top"><code class="literal">~A</code></a></td></tr><tr><td align="center">Standard <a class="link" href="#lalist" title="3.4. Lambda Lists [CLHS-3.4]">lambda list</a> keyword</td><td align="center"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html" target="_top"><code class="literal">&KEY</code></a></td></tr><tr><td align="center">Declaration</td><td align="center"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/dec_ftype.html" target="_top"><code class="literal">FTYPE</code></a></td></tr><tr><td align="center">Package</td><td align="center"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_11-1-2-2.html" target="_top"><strong class="package">“<span class="quote">COMMON-LISP-USER</span>”</strong></a></td></tr><tr><td align="center">Real file</td><td align="center"><a class="link" href="#config-lisp"><code class="filename">config.lisp</code></a></td></tr><tr><td align="center">Abstract file</td><td align="center"><code class="filename">#P".c"</code></td></tr><tr><td align="center">Code (you are likely to type it)</td><td align="center"><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_cons.html" target="_top"><code class="function">CONS</code></a> 1 2)</code></td></tr><tr><td align="center">Data (<a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> is likely to print it)</td><td align="center"><span class="data"><code class="literal">#(1 2 3)</code></span></td></tr><tr><td align="center">Program listing</td><td align="center"><pre class="programlisting">
- (defun cycle-length (n <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html" target="_top"><code class="literal">&OPTIONAL</code></a> (len 1) (top 0))
- (cond ((= n 1) (values len top))
- ((evenp n) (cycle-length (ash n -1) (1+ len) (max top n)))
- (t (let ((next (1+ (* 3 n))))
- (cycle-length next (1+ len) (max top next))))))
- </pre></td></tr><tr><td align="center">Bytecode instruction</td><td align="center"><span class="byte"><code class="literal">(STOREV <em class="replaceable"><code>k</code></em> <em class="replaceable"><code>m</code></em>)</code></span></td></tr><tr><td align="center">First mention of an entity</td><td align="center"><strong class="first"><em class="firstterm">firstterm</em></strong></td></tr><tr><td align="center">External <a class="link" href="#modules" title="32.2. External Modules">module</a></td><td align="center"><span class="module"><a class="filename" href="#libsvm" title="33.10. LibSVM Interface"><code class="filename">libsvm</code></a></span>, <span class="module"><a href="http://clisp.cvs.sourceforge.net/clisp/clisp/modules/bindings/glibc/"><code class="filename">bindings/glibc</code></a></span></td></tr></tbody></table></div></div><p><br class="table-break" /></p></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="clhs-chapters"></a>Part I. Chapters or the [<span class="citation"><a class="link" href="#CLHS" title="Common Lisp HyperSpec">Common Lisp HyperSpec</a></span>]</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="#intro">1. Introduction
- [CLHS-1]</a></span></dt><dd><dl><dt><span class="section"><a href="#spec-symb">1.1. Special Symbols
- [CLHS-1.4.1.3]</a></span></dt><dt><span class="section"><a href="#error-terms">1.2. Error Terminology
- [CLHS-1.4.2]</a></span></dt><dt><span class="section"><a href="#cl-symb">1.3. Symbols in the Package <strong class="package">“<span class="quote">COMMON-LISP</span>”</strong>
- [CLHS-1.9]</a></span></dt></dl></dd><dt><span class="chapter"><a href="#syntax">2. Syntax
- [CLHS-2]</a></span></dt><dd><dl><dt><span class="section"><a href="#std-char">2.1. Standard Characters
- [CLHS-2.1.3]</a></span></dt><dt><span class="section"><a href="#reader-alg">2.2. Reader Algorithm
- [CLHS-2.2]</a></span></dt><dt><span class="section"><a href="#tokens">2.3. Symbols as Tokens
- [CLHS-2.3.4]</a></span></dt><dt><span class="section"><a href="#valid-patterns">2.4. Valid Patterns for Tokens
- [CLHS-2.3.5]</a></span></dt><dt><span class="section"><a href="#backquote">2.5. Backquote
- [CLHS-2.4.6]</a></span></dt><dt><span class="section"><a href="#sharpsign">2.6. Sharpsign
- [CLHS-2.4.8]</a></span></dt><dd><dl><dt><span class="section"><a href="#sharpsign-backslash">2.6.1. Sharpsign Backslash
- [CLHS-2.4.8.1]</a></span></dt><dt><span class="section"><a href="#sharpsign-less-than">2.6.2. Sharpsign Less-Than-Sign
- [CLHS-2.4.8.20]</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#eval">3. Evaluation and Compilation
- [CLHS-3]</a></span></dt><dd><dl><dt><span class="section"><a href="#evaluation">3.1. Evaluation
- [CLHS-3.1]</a></span></dt><dd><dl><dt><span class="section"><a href="#eval-environ">3.1.1. Introduction to Environments
- [CLHS-3.1.1]</a></span></dt><dt><span class="section"><a href="#dyn-var">3.1.2. Dynamic Variables
- [CLHS-3.1.2.1.1.2]</a></span></dt><dt><span class="section"><a href="#function-form">3.1.3. Conses as Forms
- [CLHS-3.1.2.1.2]</a></span></dt></dl></dd><dt><span class="section"><a href="#compilation">3.2. Compilation
- [CLHS-3.2]</a></span></dt><dd><dl><dt><span class="section"><a href="#compiler-terms">3.2.1. Compiler Terminology
- [CLHS-3.2.1]</a></span></dt><dt><span class="section"><a href="#compilation-semantics">3.2.2. Compilation Semantics
- [CLHS-3.2.2]</a></span></dt><dt><span class="section"><a href="#similarity">3.2.3. Definition of Similarity
- [CLHS-3.2.4.2.2]</a></span></dt></dl></dd><dt><span class="section"><a href="#declarations">3.3. Declarations
- [CLHS-3.3]</a></span></dt><dd><dl><dt><span class="section"><a href="#spec-decl">3.3.1. Declaration <code class="literal">SPECIAL</code></a></span></dt><dt><span class="section"><a href="#safety-decl">3.3.2. Declaration <code class="literal">SAFETY</code></a></span></dt><dt><span class="section"><a href="#compile-decl">3.3.3. Declaration <code class="code">(COMPILE)</code></a></span></dt><dt><span class="section"><a href="#space-decl">3.3.4. Declaration <code class="literal">SPACE</code></a></span></dt></dl></dd><dt><span class="section"><a href="#lalist">3.4. Lambda Lists
- [CLHS-3.4]</a></span></dt><dd><dl><dt><span class="section"><a href="#boa-lalist">3.4.1. Boa Lambda Lists
- [CLHS-3.4.6]</a></span></dt></dl></dd><dt><span class="section"><a href="#eval-comp">3.5. The Evaluation and Compilation Dictionary
- [CLHS-3.8]</a></span></dt><dd><dl><dt><span class="section"><a href="#constantp">3.5.1. Function <code class="function">CONSTANTP</code></a></span></dt><dt><span class="section"><a href="#eval-when">3.5.2. Macro <code class="function">EVAL-WHEN</code></a></span></dt><dt><span class="section"><a href="#speop-the">3.5.3. Special operator <code class="function">THE</code></a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#types-classes">4. Types and Classes
- [CLHS-4]</a></span></dt><dd><dl><dt><span class="section"><a href="#types">4.1. Types
- [CLHS-4.2]</a></span></dt><dd><dl><dt><span class="section"><a href="#type-spec">4.1.1. Type Specifiers
- [CLHS-4.2.3]</a></span></dt></dl></dd><dt><span class="section"><a href="#classes">4.2. Classes
- [CLHS-4.3]</a></span></dt><dt><span class="section"><a href="#clos-diff">4.3. Deviations from ANSI CL standard</a></span></dt><dt><span class="section"><a href="#metaclasses">4.4. Standard Metaclasses
- [CLHS-4.3.1.1]</a></span></dt><dt><span class="section"><a href="#def-class">4.5. Defining Classes
- [CLHS-4.3.2]</a></span></dt><dt><span class="section"><a href="#redef-class">4.6. Redefining Classes
- [CLHS-4.3.6]</a></span></dt><dt><span class="section"><a href="#type-class-dict">4.7. The Types and Classes Dictionary
- [CLHS-4.4]</a></span></dt><dd><dl><dt><span class="section"><a href="#fixnum-char-ansi">4.7.1. Function <code class="function">COERCE</code></a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#data">5. Data and Control Flow
- [CLHS-5]</a></span></dt><dd><dl><dt><span class="section"><a href="#flow-dict">5.1. The Data and Control Flow Dictionary
- [CLHS-5.3]</a></span></dt><dd><dl><dt><span class="section"><a href="#defconstant">5.1.1. Macro <code class="function">DEFCONSTANT</code></a></span></dt><dt><span class="section"><a href="#fcase">5.1.2. Macro <code class="function">EXT:FCASE</code></a></span></dt><dt><span class="section"><a href="#xor">5.1.3. Function EXT:XOR</a></span></dt><dt><span class="section"><a href="#eq">5.1.4. Function <code class="function">EQ</code></a></span></dt><dt><span class="section"><a href="#sym-fun">5.1.5. Function <code class="function">SYMBOL-FUNCTION</code></a></span></dt><dt><span class="section"><a href="#setf">5.1.6. Macro <code class="function">SETF</code></a></span></dt><dt><span class="section"><a href="#func">5.1.7. Special Operator <code class="function">FUNCTION</code></a></span></dt><dt><span class="section"><a href="#def-sym-mac">5.1.8. Macro <code class="function">DEFINE-SYMBOL-MACRO</code></a></span></dt><dt><span class="section"><a href="#lambda">5.1.9. Macro <code class="function">LAMBDA</code></a></span></dt><dt><span class="section"><a href="#defun">5.1.10. Macros <code class="function">DEFUN</code> & <code class="function">DEFMACRO</code></a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#iteration">6. Iteration
- [CLHS-6]</a></span></dt><dd><dl><dt><span class="section"><a href="#loop">6.1. The LOOP Facility
- [CLHS-6.1]</a></span></dt><dd><dl><dt><span class="section"><a href="#loop-inter-var-finally">6.1.1. Iteration variables in the loop epilogue</a></span></dt><dt><span class="section"><a href="#loop-ansi">6.1.2. Backward Compatibility</a></span></dt></dl></dd><dt><span class="section"><a href="#iter-dict">6.2. The Iteration Dictionary
- [CLHS-6.2]</a></span></dt></dl></dd><dt><span class="chapter"><a href="#objects">7. Objects
- [CLHS-7]</a></span></dt><dd><dl><dt><span class="section"><a href="#std-meth-combo">7.1. Standard Method Combination
- [CLHS-7.6.6.2]</a></span></dt></dl></dd><dt><span class="chapter"><a href="#structures">8. Structures
- [CLHS-8]</a></span></dt><dd><dl><dt><span class="section"><a href="#defstruct-options">8.1. The options for <code class="function">DEFSTRUCT</code>.</a></span></dt><dd><dl><dt><span class="section"><a href="#defstruct-print-function">8.1.1. The :PRINT-FUNCTION
- option.</a></span></dt><dt><span class="section"><a href="#defstruct-inherit">8.1.2. The :INHERIT option</a></span></dt></dl></dd><dt><span class="section"><a href="#defstruct-mop">8.2. The structure Meta-Object Protocol.</a></span></dt></dl></dd><dt><span class="chapter"><a href="#conditions">9. Conditions
- [CLHS-9]</a></span></dt><dd><dl><dt><span class="section"><a href="#cond-nl">9.1. Embedded Newlines in Condition Reports
- [CLHS-9.1.3.1.3]</a></span></dt><dt><span class="section"><a href="#cond-dict">9.2. The Conditions Dictionary
- [CLHS-9.2]</a></span></dt></dl></dd><dt><span class="chapter"><a href="#symbols">10. Symbols
- [CLHS-10]</a></span></dt><dt><span class="chapter"><a href="#packages">11. Packages
- [CLHS-11]</a></span></dt><dd><dl><dt><span class="section"><a href="#pack-lock">11.1. Constraints on the <strong class="package">“<span class="quote">COMMON-LISP</span>”</strong> Package
- for Conforming Programs - package locking
- [CLHS-11.1.2.1.2]</a></span></dt><dt><span class="section"><a href="#clupack">11.2. The
- COMMON-LISP-USER Package
- [CLHS-11.1.2.2]</a></span></dt><dt><span class="section"><a href="#imppack">11.3. Implementation-Defined Packages
- [CLHS-11.1.2.4]</a></span></dt><dt><span class="section"><a href="#package-case">11.4. Package Case-Sensitivity</a></span></dt><dd><dl><dt><span class="section"><a href="#cs-clu">11.4.1. User Package for the Case-sensitive World</a></span></dt><dt><span class="section"><a href="#cs-pack-name">11.4.2. Package Names</a></span></dt><dt><span class="section"><a href="#cs-gensym-kwd">11.4.3. Gensyms and Keywords</a></span></dt><dt><span class="section"><a href="#case-sensitive-migration">11.4.4. Migration Tips</a></span></dt><dt><span class="section"><a href="#case-sensitive-startup">11.4.5. Using case-sensitive packages by default</a></span></dt></dl></dd><dt><span class="section"><a href="#pack-dict">11.5. The Packages Dictionary
- [CLHS-11.2]</a></span></dt><dd><dl><dt><span class="section"><a href="#make-pack">11.5.1. Function <code class="function">MAKE-PACKAGE</code></a></span></dt><dt><span class="section"><a href="#defpack">11.5.2. Macro <code class="function">DEFPACKAGE</code></a></span></dt><dt><span class="section"><a href="#re-export">11.5.3. Function <code class="function">EXT:RE-EXPORT</code></a></span></dt><dt><span class="section"><a href="#pack-inverted">11.5.4. Function <code class="function">EXT:PACKAGE-CASE-INVERTED-P</code></a></span></dt><dt><span class="section"><a href="#pack-sensitive">11.5.5. Function <code class="function">EXT:PACKAGE-CASE-SENSITIVE-P</code></a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#numbers">12. Numbers
- [CLHS-12]</a></span></dt><dd><dl><dt><span class="section"><a href="#num-types">12.1. Numeric Types</a></span></dt><dt><span class="section"><a href="#num-concepts">12.2. Number Concepts
- [CLHS-12.1]</a></span></dt><dd><dl><dt><span class="section"><a href="#byte-type">12.2.1. Byte Operations on Integers
- [CLHS-12.1.1.3.2]</a></span></dt><dt><span class="section"><a href="#float-subst">12.2.2. Rule of Float Substitutability
- [CLHS-12.1.3.3]</a></span></dt><dt><span class="section"><a href="#float-comp">12.2.3. Floating-point Computations
- [CLHS-12.1.4]</a></span></dt><dt><span class="section"><a href="#complex-comp">12.2.4. Complex Computations
- [CLHS-12.1.5]</a></span></dt><dt><span class="section"><a href="#complex-rational">12.2.5. Rule of
- Canonical Representation for Complex Rationals
- [CLHS-12.1.5.3]</a></span></dt></dl></dd><dt><span class="section"><a href="#num-dict">12.3. The Numbers Dictionary
- [CLHS-12.2]</a></span></dt><dd><dl><dt><span class="section"><a href="#random-state">12.3.1. Random Numbers</a></span></dt><dt><span class="section"><a href="#int-func-ext">12.3.2. Additional Integer Functions</a></span></dt><dt><span class="section"><a href="#float-notes">12.3.3. Floating Point Arithmetics</a></span></dt><dt><span class="section"><a href="#float-decode">12.3.4. Float Decoding
- [CLHS]</a></span></dt><dt><span class="section"><a href="#bool-ops">12.3.5. Boolean Operations
- [CLHS]</a></span></dt><dt><span class="section"><a href="#fixnum-lim">12.3.6. Fixnum Limits
- [CLHS]</a></span></dt><dt><span class="section"><a href="#bignum-lim">12.3.7. Bignum Limits
- [CLHS]</a></span></dt><dt><span class="section"><a href="#float-lim">12.3.8. Float Limits
- [CLHS]</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#characters">13. Characters
- [CLHS-13]</a></span></dt><dd><dl><dt><span class="section"><a href="#char-script">13.1. Character Scripts
- [CLHS-13.1.2.1]</a></span></dt><dt><span class="section"><a href="#char-attrib">13.2. Character Attributes
- [CLHS-13.1.3]</a></span></dt><dd><dl><dt><span class="section"><a href="#input-char">13.2.1. Input Characters</a></span></dt></dl></dd><dt><span class="section"><a href="#graph-char">13.3. Graphic Characters
- [CLHS-13.1.4.1]</a></span></dt><dt><span class="section"><a href="#alpha-char">13.4. Alphabetic Characters
- [CLHS-13.1.4.2]</a></span></dt><dt><span class="section"><a href="#char-case">13.5. Characters With Case
- [CLHS-13.1.4.3]</a></span></dt><dd><dl><dt><span class="section"><a href="#char-invertcase">13.5.1. Function <code class="function">EXT:CHAR-INVERTCASE</code></a></span></dt><dt><span class="section"><a href="#char-ext">13.5.2. Case of Implementation-Defined Characters
- [CLHS-13.1.4.3.4]</a></span></dt></dl></dd><dt><span class="section"><a href="#num-char">13.6. Numeric Characters
- [CLHS-13.1.4.4]</a></span></dt><dt><span class="section"><a href="#char-ord">13.7. Ordering of Characters
- [CLHS-13.1.6]</a></span></dt><dt><span class="section"><a href="#clhs-newline">13.8. Treatment of Newline during Input and Output
- [CLHS-13.1.8]</a></span></dt><dt><span class="section"><a href="#char-int">13.9. Character Encodings
- [CLHS-13.1.9]</a></span></dt><dt><span class="section"><a href="#script-ext">13.10. Documentation
- of Implementation-Defined Scripts
- [CLHS-13.1.10]</a></span></dt><dt><span class="section"><a href="#char-dict">13.11. The Characters Dictionary
- [CLHS-13.2]</a></span></dt><dd><dl><dt><span class="section"><a href="#char-code">13.11.1. Function <code class="function">CHAR-CODE</code></a></span></dt><dt><span class="section"><a href="#base-char">13.11.2. Type <code class="classname">BASE-CHAR</code></a></span></dt><dt><span class="section"><a href="#char-width">13.11.3. Function <code class="function">EXT:CHAR-WIDTH</code></a></span></dt></dl></dd><dt><span class="section"><a href="#char-platform-dep">13.12. Platform-Dependent Characters</a></span></dt><dt><span class="section"><a href="#char-bits">13.13. Obsolete Constants</a></span></dt></dl></dd><dt><span class="chapter"><a href="#conses">14. Conses
- [CLHS-14]</a></span></dt><dd><dl><dt><span class="section"><a href="#cons-dict">14.1. The Conses Dictionary
- [CLHS-14.2]</a></span></dt><dd><dl><dt><span class="section"><a href="#map-func">14.1.1. Mapping Functions</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#arrays">15. Arrays
- [CLHS-15]</a></span></dt><dd><dl><dt><span class="section"><a href="#array-elts">15.1. Array Elements
- [CLHS-15.1.1]</a></span></dt><dt><span class="section"><a href="#array-dict">15.2. The Arrays Dictionary
- [CLHS-15.2]</a></span></dt></dl></dd><dt><span class="chapter"><a href="#strings">16. Strings
- [CLHS-16]</a></span></dt><dd><dl><dt><span class="section"><a href="#string-dict">16.1. The Strings Dictionary
- [CLHS-16.2]</a></span></dt><dd><dl><dt><span class="section"><a href="#string-comp">16.1.1. String Comparison</a></span></dt><dt><span class="section"><a href="#string-width">16.1.2. Function <code class="function">EXT:STRING-WIDTH</code></a></span></dt><dt><span class="section"><a href="#string-invertcase">16.1.3. Functions <code class="function">EXT:STRING-INVERTCASE</code>
- and <code class="function">EXT:NSTRING-INVERTCASE</code></a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#sequences">17. Sequences
- [CLHS-17]</a></span></dt><dd><dl><dt><span class="section"><a href="#seq-dict">17.1. The Sequences Dictionary
- [CLHS-17.3]</a></span></dt><dd><dl><dt><span class="section"><a href="#seq-macro-ext">17.1.1. Additional Macros</a></span></dt><dt><span class="section"><a href="#nreverse-nreconc">17.1.2. Functions <code class="function">NREVERSE</code> & <code class="function">NRECONC</code></a></span></dt><dt><span class="section"><a href="#rem-del">17.1.3. Functions <code class="function">REMOVE</code> & <code class="function">DELETE</code></a></span></dt><dt><span class="section"><a href="#sorting">17.1.4. Functions <code class="function">SORT</code> & <code class="function">STABLE-SORT</code></a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#hash">18. Hash Tables
- [CLHS-18]</a></span></dt><dd><dl><dt><span class="section"><a href="#hash-dict">18.1. The Hash Tables Dictionary
- [CLHS-18.2]</a></span></dt><dd><dl><dt><span class="section"><a href="#make-hash">18.1.1. Function <code class="function">MAKE-HASH-TABLE</code></a></span></dt><dt><span class="section"><a href="#defhash">18.1.2. Macro <code class="function">EXT:DEFINE-HASH-TABLE-TEST</code></a></span></dt><dt><span class="section"><a href="#ht-test">18.1.3. Function <code class="function">HASH-TABLE-TEST</code></a></span></dt><dt><span class="section"><a href="#dohash">18.1.4. Macro <code class="function">EXT:DOHASH</code></a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#filenames">19. Filenames
- [CLHS-19]</a></span></dt><dd><dl><dt><span class="section"><a href="#path-components">19.1. Pathname Components
- [CLHS-19.2.1]</a></span></dt><dd><dl><dt><span class="section"><a href="#path-dir-canon">19.1.1. Directory canonicalization</a></span></dt><dt><span class="section"><a href="#path-platform-specific">19.1.2. Platform-specific issues</a></span></dt></dl></dd><dt><span class="section"><a href="#unspecific">19.2. :UNSPECIFIC as a Component Value
- [CLHS-19.2.2.2.3]</a></span></dt><dt><span class="section"><a href="#path-external-notation">19.3. External notation</a></span></dt><dt><span class="section"><a href="#log-path">19.4. Logical Pathnames
- [CLHS-19.3]</a></span></dt><dt><span class="section"><a href="#filename-dict">19.5. The Filenames Dictionary
- [CLHS-19.4]</a></span></dt><dd><dl><dt><span class="section"><a href="#translate-pathname">19.5.1. Function <code class="function">TRANSLATE-PATHNAME</code></a></span></dt><dt><span class="section"><a href="#translate-logpath">19.5.2. Function <code class="function">TRANSLATE-LOGICAL-PATHNAME</code></a></span></dt><dt><span class="section"><a href="#parsename">19.5.3. Function <code class="function">PARSE-NAMESTRING</code></a></span></dt><dt><span class="section"><a href="#pathmerge">19.5.4. Function <code class="function">MERGE-PATHNAMES</code></a></span></dt><dt><span class="section"><a href="#load-lpt">19.5.5. Function <code class="function">LOAD-LOGICAL-PATHNAME-TRANSLATIONS</code></a></span></dt><dt><span class="section"><a href="#absolute-pathname">19.5.6. Function <code class="function">EXT:ABSOLUTE-PATHNAME</code></a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#files">20. Files
- [CLHS-20]</a></span></dt><dd><dl><dt><span class="section"><a href="#file-dict">20.1. The Files Dictionary
- [CLHS-20.2]</a></span></dt></dl></dd><dt><span class="chapter"><a href="#streams">21. Streams
- [CLHS-21]</a></span></dt><dd><dl><dt><span class="section"><a href="#streams-interactive">21.1. Interactive Streams
- [CLHS-21.1.1.1.3]</a></span></dt><dt><span class="section"><a href="#terminal">21.2. Terminal interaction</a></span></dt><dd><dl><dt><span class="section"><a href="#readline">21.2.1. Command line editing with GNU readline</a></span></dt><dt><span class="section"><a href="#with-kbd">21.2.2. Macro <code class="function">EXT:WITH-KEYBOARD</code></a></span></dt></dl></dd><dt><span class="section"><a href="#stream-dict">21.3. The Streams Dictionary
- [CLHS-21.2]</a></span></dt><dd><dl><dt><span class="section"><a href="#stream-eltype">21.3.1. Function <code class="function">STREAM-ELEMENT-TYPE</code></a></span></dt><dt><span class="section"><a href="#make-stream">21.3.2. Function <code class="function">EXT:MAKE-STREAM</code></a></span></dt><dt><span class="section"><a href="#bin-input">21.3.3. Binary input, <code class="function">READ-BYTE</code>,
- <code class="function">EXT:READ-INTEGER</code> & <code class="function">EXT:READ-FLOAT</code></a></span></dt><dt><span class="section"><a href="#bin-output">21.3.4. Binary output, <code class="function">WRITE-BYTE</code>,
- <code class="function">EXT:WRITE-INTEGER</code> & <code class="function">EXT:WRITE-FLOAT</code></a></span></dt><dt><span class="section"><a href="#bulk-io">21.3.5. Bulk Input and Output</a></span></dt><dt><span class="section"><a href="#non-block-io">21.3.6. Non-Blocking Input and Output</a></span></dt><dt><span class="section"><a href="#file-pos">21.3.7. Function <code class="function">FILE-POSITION</code></a></span></dt><dt><span class="section"><a href="#elastic-newline">21.3.8. Avoiding blank lines, <code class="function">EXT:ELASTIC-NEWLINE</code></a></span></dt><dt><span class="section"><a href="#open">21.3.9. Function <code class="function">OPEN</code></a></span></dt><dt><span class="section"><a href="#close">21.3.10. Function <code class="function">CLOSE</code></a></span></dt><dt><span class="section"><a href="#open-stream-p">21.3.11. Function <code class="function">OPEN-STREAM-P</code></a></span></dt><dt><span class="section"><a href="#broadcast-stream">21.3.12. Class <code class="classname">BROADCAST-STREAM</code></a></span></dt><dt><span class="section"><a href="#stream-buffer">21.3.13. Functions
- EXT:MAKE-BUFFERED-INPUT-STREAM
- and
- EXT:MAKE-BUFFERED-OUTPUT-STREAM
- </a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#printer">22. Printer
- [CLHS-22]</a></span></dt><dd><dl><dt><span class="section"><a href="#multi-rep">22.1. Multiple Possible Textual Representations
- [CLHS-22.1.1.1]</a></span></dt><dt><span class="section"><a href="#spacecharprint">22.2. Printing Characters
- [CLHS-22.1.3.2]</a></span></dt><dt><span class="section"><a href="#sym-pack-prefix">22.3. Package Prefixes for Symbols
- [CLHS-22.1.3.3.1]</a></span></dt><dt><span class="section"><a href="#print-vector">22.4. Printing Other Vectors
- [CLHS-22.1.3.7]</a></span></dt><dt><span class="section"><a href="#print-array">22.5. Printing Other Arrays
- [CLHS-22.1.3.8]</a></span></dt><dd><dl><dt><span class="section"><a href="#pathprint">22.5.1. Printing Pathnames
- [CLHS-22.1.3.11]</a></span></dt></dl></dd><dt><span class="section"><a href="#clpp">22.6. The Lisp Pretty Printer
- [CLHS-22.2]</a></span></dt><dd><dl><dt><span class="section"><a href="#pp-dispatch">22.6.1. Pretty Print Dispatch Table
- [CLHS-22.2.1.4]</a></span></dt></dl></dd><dt><span class="section"><a href="#print-formatted">22.7. Formatted Output
- [CLHS-22.3]</a></span></dt><dt><span class="section"><a href="#print-dict">22.8. The Printer Dictionary
- [CLHS-22.4]</a></span></dt><dd><dl><dt><span class="section"><a href="#write">22.8.1. Functions <code class="function">WRITE</code> & <code class="function">WRITE-TO-STRING</code></a></span></dt><dt><span class="section"><a href="#print-unreadable-object">22.8.2. Macro <code class="function">PRINT-UNREADABLE-OBJECT</code></a></span></dt><dt><span class="section"><a href="#print-misc">22.8.3. Miscellaneous Issues</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#reader">23. Reader
- [CLHS-23]</a></span></dt><dd><dl><dt><span class="section"><a href="#rt-case">23.1. Effect of Readtable Case on the Lisp Reader
- [CLHS-23.1.2]</a></span></dt><dt><span class="section"><a href="#recursive-p">23.2. The recursive-p argument
- [CLHS-23.1.3.2]</a></span></dt></dl></dd><dt><span class="chapter"><a href="#system">24. System Construction
- [CLHS-24]</a></span></dt><dd><dl><dt><span class="section"><a href="#system-dict">24.1. The System Construction Dictionary
- [CLHS-24.2]</a></span></dt><dd><dl><dt><span class="section"><a href="#compilefile">24.1.1. Function <code class="function">COMPILE-FILE</code></a></span></dt><dt><span class="section"><a href="#compile-file-path">24.1.2. Function <code class="function">COMPILE-FILE-PATHNAME</code></a></span></dt><dt><span class="section"><a href="#require">24.1.3. Function <code class="function">REQUIRE</code></a></span></dt><dt><span class="section"><a href="#loadfile">24.1.4. Function <code class="function">LOAD</code></a></span></dt><dt><span class="section"><a href="#features">24.1.5. Variable <code class="varname">*FEATURES*</code></a></span></dt><dt><span class="section"><a href="#featurep">24.1.6. Function EXT:FEATUREP
- [CLRFI-1]</a></span></dt><dt><span class="section"><a href="#compiled-file-p">24.1.7. Function <code class="function">EXT:COMPILED-FILE-P</code>
- [CLRFI-2]</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#environment">25. Environment
- [CLHS-25]</a></span></dt><dd><dl><dt><span class="section"><a href="#debugger">25.1. Debugging Utilities
- [CLHS-25.1.2]</a></span></dt><dd><dl><dt><span class="section"><a href="#user-commands">25.1.1. User-customizable Commands</a></span></dt></dl></dd><dt><span class="section"><a href="#environment-dict">25.2. The Environment Dictionary
- [CLHS-25.2]</a></span></dt><dd><dl><dt><span class="section"><a href="#disassemble">25.2.1. Function <code class="function">DISASSEMBLE</code></a></span></dt><dt><span class="section"><a href="#uncompile">25.2.2. Function <code class="function">EXT:UNCOMPILE</code></a></span></dt><dt><span class="section"><a href="#documentation">25.2.3. Function <code class="function">DOCUMENTATION</code></a></span></dt><dt><span class="section"><a href="#describe">25.2.4. Function <code class="function">DESCRIBE</code></a></span></dt><dt><span class="section"><a href="#trace">25.2.5. Macro <code class="function">TRACE</code></a></span></dt><dt><span class="section"><a href="#inspect">25.2.6. Function <code class="function">INSPECT</code></a></span></dt><dt><span class="section"><a href="#room">25.2.7. Function <code class="function">ROOM</code></a></span></dt><dt><span class="section"><a href="#time">25.2.8. Macro <code class="function">TIME</code></a></span></dt><dt><span class="section"><a href="#ed">25.2.9. Function <code class="function">ED</code></a></span></dt><dt><span class="section"><a href="#clock">25.2.10. Clock Time</a></span></dt><dt><span class="section"><a href="#machine">25.2.11. Machine</a></span></dt><dt><span class="section"><a href="#apropos">25.2.12. Functions <code class="function">APROPOS</code> & <code class="function">APROPOS-LIST</code></a></span></dt><dt><span class="section"><a href="#dribble">25.2.13. Function <code class="function">DRIBBLE</code></a></span></dt><dt><span class="section"><a href="#version">25.2.14. Function <code class="function">LISP-IMPLEMENTATION-VERSION</code></a></span></dt><dt><span class="section"><a href="#argv">25.2.15. Function <code class="function">EXT:ARGV</code></a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#glossary">26. Glossary
- [CLHS-26]</a></span></dt><dt><span class="chapter"><a href="#appendix">27. Appendix
- [CLHS-a]</a></span></dt><dt><span class="chapter"><a href="#issues">28. X3J13 Issue Index
- [CLHS-ic]</a></span></dt></dl></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="intro"></a>Chapter 1. Introduction
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/chap-1.html" target="_top">[CLHS-1]</a></h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#spec-symb">1.1. Special Symbols
- [CLHS-1.4.1.3]</a></span></dt><dt><span class="section"><a href="#error-terms">1.2. Error Terminology
- [CLHS-1.4.2]</a></span></dt><dt><span class="section"><a href="#cl-symb">1.3. Symbols in the Package <strong class="package">“<span class="quote">COMMON-LISP</span>”</strong>
- [CLHS-1.9]</a></span></dt></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="spec-symb"></a>1.1. Special Symbols
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_1-4-1-3.html" target="_top">[CLHS-1.4.1.3]</a></h2></div></div></div><p>The <strong class="first"><em class="firstterm">final delimiter
- <a id="fin-delim" class="indexterm"></a></em></strong>
- of an interactive stream:
- </p><div class="variablelist"><dl><dt><span class="term"><a class="ulink" href="http://www.UNIX-systems.org/online.html" target="_top"><span class="strong"><strong>UNIX</strong></span></a></span></dt><dd>type <span class="keycap"><strong>Control</strong></span>+<span class="keysym">D</span>
- at the beginning of a line</dd><dt><span class="term"><a class="ulink" href="http://winehq.com/" target="_top"><span class="platform">Win32</span></a></span></dt><dd>type <span class="keycap"><strong>Control</strong></span>+<span class="keysym">Z</span>,
- followed by <span class="keycap"><strong>Return</strong></span></dd></dl></div><p>
- This final delimiter is never actually seen by programs; no need to
- test for <span class="keysym">#\^D</span> or <span class="keysym">#\^Z</span> - use
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_read-char-no-hang.html" target="_top"><code class="function">READ-CHAR-NO-HANG</code></a> to check for <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/glo_e.html#end_of_file" target="_top"><code class="literal">end-of-stream</code></a>.
- Calling <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_clear-input.html" target="_top"><code class="function">CLEAR-INPUT</code></a> on the stream removes the <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/glo_e.html#end_of_file" target="_top"><code class="literal">end-of-stream</code></a> state,
- thus making it available for further input.</p><p>A newline character can be entered by the user by pressing the
- <span class="keycap"><strong>Newline</strong></span> key or, on the numeric keypad, the
- <span class="keycap"><strong>Enter</strong></span> key.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="error-terms"></a>1.2. Error Terminology
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_1-4-2.html" target="_top">[CLHS-1.4.2]</a></h2></div></div></div><p>Safety settings are ignored by the interpreted code;
- therefore where the standard uses the phrase “<span class="quote">should signal an
- error</span>”, an <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_error.html" target="_top"><code class="classname">ERROR</code></a> is <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_signal.html" target="_top"><code class="function">SIGNAL</code></a>ed.
- See <a class="xref" href="#safety-decl" title="3.3.2. Declaration SAFETY">Section 3.3.2, “Declaration <code class="literal">SAFETY</code>”</a> for the safety of compiled code.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="cl-symb"></a>1.3. Symbols in the Package <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_11-1-2-1.html" target="_top"><strong class="package">“<span class="quote">COMMON-LISP</span>”</strong></a>
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_1-9.html" target="_top">[CLHS-1.9]</a></h2></div></div></div><p>All 978 symbols in the <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_11-1-2-1.html" target="_top"><strong class="package">“<span class="quote">COMMON-LISP</span>”</strong></a> package specified by the
- [<span class="citation"><a class="link" href="#ansi-cl" title="ANSI Common Lisp standard X3.226-1994 - Information Technology - Programming Language - Common Lisp">ANSI CL standard</a></span>] are implemented.</p></div></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="syntax"></a>Chapter 2. Syntax
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/chap-2.html" target="_top">[CLHS-2]</a></h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#std-char">2.1. Standard Characters
- [CLHS-2.1.3]</a></span></dt><dt><span class="section"><a href="#reader-alg">2.2. Reader Algorithm
- [CLHS-2.2]</a></span></dt><dt><span class="section"><a href="#tokens">2.3. Symbols as Tokens
- [CLHS-2.3.4]</a></span></dt><dt><span class="section"><a href="#valid-patterns">2.4. Valid Patterns for Tokens
- [CLHS-2.3.5]</a></span></dt><dt><span class="section"><a href="#backquote">2.5. Backquote
- [CLHS-2.4.6]</a></span></dt><dt><span class="section"><a href="#sharpsign">2.6. Sharpsign
- [CLHS-2.4.8]</a></span></dt><dd><dl><dt><span class="section"><a href="#sharpsign-backslash">2.6.1. Sharpsign Backslash
- [CLHS-2.4.8.1]</a></span></dt><dt><span class="section"><a href="#sharpsign-less-than">2.6.2. Sharpsign Less-Than-Sign
- [CLHS-2.4.8.20]</a></span></dt></dl></dd></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="std-char"></a>2.1. Standard Characters
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-1-3.html" target="_top">[CLHS-2.1.3]</a></h2></div></div></div><p>The standard characters are <span class="keysym">#\Newline</span> and the
- <a class="link" href="#graph-char" title="13.3. Graphic Characters [CLHS-13.1.4.1]">graphic characters</a>
- with a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> between 32 and 126 (inclusive).</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="reader-alg"></a>2.2. Reader Algorithm
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-2.html" target="_top">[CLHS-2.2]</a></h2></div></div></div><p>The requirement of step 4 that a
- “<span class="quote"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/glo_r.html#reader_macro_function" target="_top">reader
- macro function</a> may return zero values or one value</span>”
- <span class="strong"><strong>is</strong></span> enforced. You can use the function <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/acc_values.html" target="_top"><code class="function">VALUES</code></a> to control the
- number of values returned.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="tokens"></a>2.3. Symbols as Tokens
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-3-4.html" target="_top">[CLHS-2.3.4]</a></h2></div></div></div><p>A <strong class="first"><em class="firstterm">reserved token
- <a id="res-token" class="indexterm"></a></em></strong>,
- i.e., a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/glo_t.html#token" target="_top">token</a> that has
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/glo_p.html#potential_number" target="_top">potential number</a>
- syntax but cannot be interpreted as a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_number.html" target="_top"><code class="classname">NUMBER</code></a>, is interpreted as
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_symbol.html" target="_top"><code class="classname">SYMBOL</code></a> when being read.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="valid-patterns"></a>2.4. Valid Patterns for Tokens
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-3-5.html" target="_top">[CLHS-2.3.5]</a></h2></div></div></div><p>When a token with package markers is read, then no checking is
- done whether the <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_symbol-package.html" target="_top"><code class="function">SYMBOL-PACKAGE</code></a> part and the <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_symbol-name.html" target="_top"><code class="function">SYMBOL-NAME</code></a> part do
- not have number syntax. (What would the purpose of this check be?)
- So we consider tokens like <span class="token">USER::</span> or <span class="token">:1</span> or
- <span class="token">LISP::4711</span> or <span class="token">21:3</span> as symbols.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="backquote"></a>2.5. Backquote
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-6.html" target="_top">[CLHS-2.4.6]</a></h2></div></div></div><p>The backquote read macro also works when nested. Example:
- <a id="bq-nested"></a></p><pre class="programlisting">
- (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_eval.html" target="_top"><code class="function">EVAL</code></a> ``(,#'(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_lambda.html" target="_top"><code class="function">LAMBDA</code></a> () ',a) ,#'(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_lambda.html" target="_top"><code class="function">LAMBDA</code></a> () ',b)))
- ≡ (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_eval.html" target="_top"><code class="function">EVAL</code></a> `(list #'(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_lambda.html" target="_top"><code class="function">LAMBDA</code></a> () ',a) #'(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_lambda.html" target="_top"><code class="function">LAMBDA</code></a> () ',b)))
- ≡ (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_eval.html" target="_top"><code class="function">EVAL</code></a> (list 'list (list 'function (list 'lambda nil (list 'quote a)))
- (list 'function (list 'lambda nil (list 'quote b)))))
- </pre></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="sharpsign"></a>2.6. Sharpsign
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8.html" target="_top">[CLHS-2.4.8]</a></h2></div></div></div><div class="toc"><dl><dt><span class="section"><a href="#sharpsign-backslash">2.6.1. Sharpsign Backslash
- [CLHS-2.4.8.1]</a></span></dt><dt><span class="section"><a href="#sharpsign-less-than">2.6.2. Sharpsign Less-Than-Sign
- [CLHS-2.4.8.20]</a></span></dt></dl></div><p>Reader macros are also defined for the following:
- </p><div class="variablelist"><a id="extra-read-macro-table"></a><p class="title"><b>Additional reader macros</b></p><dl><dt><span class="term">#,</span></dt><dd>load-time evaluation, kept despite the [<span class="citation"><a class="link" href="#ansi-cl" title="ANSI Common Lisp standard X3.226-1994 - Information Technology - Programming Language - Common Lisp">ANSI CL standard</a></span>]
- issue <a class="ulink" href="http://www.lisp.org/HyperSpec/Issues/iss315.html" target="_top">SHARP-COMMA-CONFUSION:REMOVE</a>.</dd><dt><span class="term">#Y</span></dt><dd>compiled <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_function.html" target="_top"><code class="classname">FUNCTION</code></a> objects and <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/glo_i.html#input" target="_top">input</a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_stream.html" target="_top"><code class="classname">STREAM</code></a>'s <a class="link" href="#encoding" title="31.5. Encodings"><code class="classname">EXT:ENCODING</code></a>s
- </dd><dt><span class="term">#""</span></dt><dd><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_pathname.html" target="_top"><code class="classname">PATHNAME</code></a>: <code class="filename">#"test.lisp"</code>
- is the value of <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_pathname.html" target="_top"><code class="function">PATHNAME</code></a> "test.lisp")</code></dd></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="sharpsign-backslash"></a>2.6.1. Sharpsign Backslash
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8-1.html" target="_top">[CLHS-2.4.8.1]</a></h3></div></div></div><p><span class="keysym">#\Code</span> allows input of characters of arbitrary code:
- e.g., <span class="keysym">#\Code231</span> reads as the character
- <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> 231)</code>.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="sharpsign-less-than"></a>2.6.2. Sharpsign Less-Than-Sign
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8-20.html" target="_top">[CLHS-2.4.8.20]</a></h3></div></div></div><p>This is the list of objects whose external representation cannot
- be meaningfully read in:</p><div class="variablelist"><a id="unreadable-objects"></a><p class="title"><b>Unreadable objects</b></p><dl><dt><span class="term"><code class="literal"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8-20.html" target="_top"><span class="data"><code class="literal">#<</code></span></a><em class="replaceable"><code>type</code></em> ...></code></span></dt><dd>all <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/cla_structure-object.html" target="_top"><code class="classname">STRUCTURE-OBJECT</code></a>s lacking a keyword
- constructor</dd><dt><span class="term"><code class="literal"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8-20.html" target="_top"><span class="data"><code class="literal">#<</code></span></a>ARRAY <em class="replaceable"><code>type</code></em>
- <em class="replaceable"><code>dimensions</code></em>></code></span></dt><dd>all <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_array.html" target="_top"><code class="classname">ARRAY</code></a>s except <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_string.html" target="_top"><code class="classname">STRING</code></a>s, if
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/var_stprint-arrayst.html" target="_top"><code class="varname">*PRINT-ARRAY*</code></a> is <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_nil.html" target="_top"><code class="constant">NIL</code></a></dd><dt><span class="term"><code class="literal"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8-20.html" target="_top"><span class="data"><code class="literal">#<</code></span></a>SYSTEM-FUNCTION
- <em class="replaceable"><code>name</code></em>></code></span></dt><dd>built-in function written in <a class="ulink" href="http://www.eskimo.com/~scs/C-faq/top.html" target="_top"><span class="command"><strong>C</strong></span></a>
- </dd><dt><span class="term"><code class="literal"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8-20.html" target="_top"><span class="data"><code class="literal">#<</code></span></a>ADD-ON-SYSTEM-FUNCTION
- <em class="replaceable"><code>name</code></em>></code></span></dt><dd><a class="link" href="#modules" title="32.2. External Modules">module</a> function written in <a class="ulink" href="http://www.eskimo.com/~scs/C-faq/top.html" target="_top"><span class="command"><strong>C</strong></span></a>
- </dd><dt><span class="term"><code class="literal"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8-20.html" target="_top"><span class="data"><code class="literal">#<</code></span></a>SPECIAL-OPERATOR
- <em class="replaceable"><code>name</code></em>></code></span></dt><dd>special operator handler</dd><dt><span class="term"><code class="literal"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8-20.html" target="_top"><span class="data"><code class="literal">#<</code></span></a>COMPILED-CLOSURE
- <em class="replaceable"><code>name</code></em>></code></span></dt><dd>compiled function, if <a class="link" href="#pr-closure" title="Variable CUSTOM:*PRINT-CLOSURE*"><code class="varname">CUSTOM:*PRINT-CLOSURE*</code></a> is <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_nil.html" target="_top"><code class="constant">NIL</code></a>
- </dd><dt><span class="term"><code class="literal"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8-20.html" target="_top"><span class="data"><code class="literal">#<</code></span></a>CLOSURE <em class="replaceable"><code>name</code></em> ...></code></span></dt><dd>interpreted function</dd><dt><span class="term"><code class="literal"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8-20.html" target="_top"><span class="data"><code class="literal">#<</code></span></a>FRAME-POINTER #x...></code></span></dt><dd>pointer to a stack frame</dd><dt><span class="term"><code class="literal"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8-20.html" target="_top"><span class="data"><code class="literal">#<</code></span></a>DISABLED POINTER></code></span></dt><dd>frame pointer which has become invalid on exit from the
- corresponding <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/speope_block.html" target="_top"><code class="function">BLOCK</code></a> or <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/speope_tagbody.html" target="_top"><code class="function">TAGBODY</code></a></dd><dt><span class="term"><code class="literal"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8-20.html" target="_top"><span class="data"><code class="literal">#<</code></span></a>...STREAM...></code></span></dt><dd><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_stream.html" target="_top"><code class="classname">STREAM</code></a></dd><dt><span class="term"><code class="literal"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8-20.html" target="_top"><span class="data"><code class="literal">#<</code></span></a>PACKAGE <em class="replaceable"><code>name</code></em>></code></span></dt><dd><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_package.html" target="_top"><code class="classname">PACKAGE</code></a></dd><dt><span class="term"><code class="literal"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8-20.html" target="_top"><span class="data"><code class="literal">#<</code></span></a>HASH-TABLE #x...></code></span></dt><dd><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_hash-table.html" target="_top"><code class="classname">HASH-TABLE</code></a>, if <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/var_stprint-arrayst.html" target="_top"><code class="varname">*PRINT-ARRAY*</code></a> is <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_nil.html" target="_top"><code class="constant">NIL</code></a>
- </dd><dt><span class="term"><code class="literal"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8-20.html" target="_top"><span class="data"><code class="literal">#<</code></span></a>READTABLE #x...></code></span></dt><dd><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_readtable.html" target="_top"><code class="classname">READTABLE</code></a></dd><dt><span class="term"><code class="literal"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8-20.html" target="_top"><span class="data"><code class="literal">#<</code></span></a>SYMBOL-MACRO
- <em class="replaceable"><code>form</code></em>></code></span></dt><dd><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_define-symbol-macro.html" target="_top"><code class="classname">SYMBOL-MACRO</code></a> handler</dd><dt><span class="term"><code class="literal"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8-20.html" target="_top"><span class="data"><code class="literal">#<</code></span></a>MACRO <em class="replaceable"><code>function</code></em>></code></span></dt><dd>macro expander (defined by <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defmacro.html" target="_top"><code class="function">DEFMACRO</code></a> and friends)
- </dd>
- <!--#ifdef FOREIGN-->
- <dt><span class="term"><code class="literal"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8-20.html" target="_top"><span class="data"><code class="literal">#<</code></span></a><a class="link" href="#fptr"><code class="classname">FFI:FOREIGN-POINTER</code></a>
- #x...></code></span></dt><dd>foreign pointer (<span class="plat-dep">Platform Dependent: <span class="plat-dep"><a class="ulink" href="http://www.UNIX-systems.org/online.html" target="_top"><span class="strong"><strong>UNIX</strong></span></a>, <a class="ulink" href="http://winehq.com/" target="_top"><span class="platform">Win32</span></a> platforms only.</span></span>)
- </dd>
- <!--#endif-->
- <!--#ifdef DYNAMIC_FFI-->
- <dt><span class="term"><code class="literal"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8-20.html" target="_top"><span class="data"><code class="literal">#<</code></span></a><a class="link" href="#faddr"><code class="classname">FFI:FOREIGN-ADDRESS</code></a>
- #x...></code></span></dt><dd>foreign address
- (<span class="plat-dep">Platform Dependent: <span class="plat-dep"><a class="ulink" href="http://www.UNIX-systems.org/online.html" target="_top"><span class="strong"><strong>UNIX</strong></span></a>, <a class="ulink" href="http://winehq.com/" target="_top"><span class="platform">Win32</span></a> platforms only.</span></span>)</dd><dt><span class="term"><code class="literal"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8-20.html" target="_top"><span class="data"><code class="literal">#<</code></span></a><a class="link" href="#dffi-variables" title="32.3.5. Foreign variables"><code class="classname">FFI:FOREIGN-VARIABLE</code></a> <em class="replaceable"><code>name</code></em>
- #x...></code></span></dt><dd>foreign variable (<span class="plat-dep">Platform Dependent: <span class="plat-dep"><a class="ulink" href="http://www.UNIX-systems.org/online.html" target="_top"><span class="strong"><strong>UNIX</strong></span></a>, <a class="ulink" href="http://winehq.com/" target="_top"><span class="platform">Win32</span></a> platforms only.</span></span>)
- </dd><dt><span class="term"><code class="literal"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8-20.html" target="_top"><span class="data"><code class="literal">#<</code></span></a><a class="link" href="#dffi" title="32.3. The Foreign Function Call Facility"><code class="classname">FFI:FOREIGN-FUNCTION</code></a> <em class="replaceable"><code>name</code></em>
- #x...></code></span></dt><dd>foreign function (<span class="plat-dep">Platform Dependent: <span class="plat-dep"><a class="ulink" href="http://www.UNIX-systems.org/online.html" target="_top"><span class="strong"><strong>UNIX</strong></span></a>, <a class="ulink" href="http://winehq.com/" target="_top"><span class="platform">Win32</span></a> platforms only.</span></span>)
- </dd>
- <!--#endif-->
- <dt><span class="term"><code class="literal"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8-20.html" target="_top"><span class="data"><code class="literal">#<</code></span></a>UNBOUND></code></span></dt><dd>“<span class="quote">value</span>” of an unbound symbol, an unsupplied
- optional or keyword argument</dd><dt><span class="term"><code class="literal"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8-20.html" target="_top"><span class="data"><code class="literal">#<</code></span></a>SPECIAL REFERENCE></code></span></dt><dd>environment marker for variables declared <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/dec_special.html" target="_top"><code class="literal">SPECIAL</code></a>
- </dd><dt><span class="term"><code class="literal"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8-20.html" target="_top"><span class="data"><code class="literal">#<</code></span></a>DOT></code></span></dt><dd>internal <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_readcm_re_g-whitespace.html" target="_top"><code class="function">READ</code></a> result for “<span class="quote">.</span>”
- </dd><dt><span class="term"><code class="literal"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8-20.html" target="_top"><span class="data"><code class="literal">#<</code></span></a>END OF FILE></code></span></dt><dd>internal <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_readcm_re_g-whitespace.html" target="_top"><code class="function">READ</code></a> result, when the <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/glo_e.html#end_of_file" target="_top"><code class="literal">end-of-stream</code></a> is reached
- </dd><dt><span class="term"><code class="literal"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8-20.html" target="_top"><span class="data"><code class="literal">#<</code></span></a>READ-LABEL ...></code></span></dt><dd>intermediate <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_readcm_re_g-whitespace.html" target="_top"><code class="function">READ</code></a> result for <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8-16.html" target="_top"><span class="data"><code class="literal">#n#</code></span></a>
- </dd><dt><span class="term"><code class="literal"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8-20.html" target="_top"><span class="data"><code class="literal">#<</code></span></a>ADDRESS #x...></code></span></dt><dd>machine address, should not occur
- </dd><dt><span class="term"><code class="literal"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8-20.html" target="_top"><span class="data"><code class="literal">#<</code></span></a>SYSTEM-POINTER #x...></code></span></dt><dd>should not occur</dd></dl></div></div></div></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="eval"></a>Chapter 3. Evaluation and Compilation
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/chap-3.html" target="_top">[CLHS-3]</a></h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#evaluation">3.1. Evaluation
- [CLHS-3.1]</a></span></dt><dd><dl><dt><span class="section"><a href="#eval-environ">3.1.1. Introduction to Environments
- [CLHS-3.1.1]</a></span></dt><dt><span class="section"><a href="#dyn-var">3.1.2. Dynamic Variables
- [CLHS-3.1.2.1.1.2]</a></span></dt><dt><span class="section"><a href="#function-form">3.1.3. Conses as Forms
- [CLHS-3.1.2.1.2]</a></span></dt></dl></dd><dt><span class="section"><a href="#compilation">3.2. Compilation
- [CLHS-3.2]</a></span></dt><dd><dl><dt><span class="section"><a href="#compiler-terms">3.2.1. Compiler Terminology
- [CLHS-3.2.1]</a></span></dt><dt><span class="section"><a href="#compilation-semantics">3.2.2. Compilation Semantics
- [CLHS-3.2.2]</a></span></dt><dd><dl><dt><span class="section"><a href="#compiler-macros">3.2.2.1. Compiler Macros
- [CLHS-3.2.2.1]</a></span></dt><dt><span class="section"><a href="#minimal-compilation">3.2.2.2. Minimal Compilation
- [CLHS-3.2.2.2]</a></span></dt><dt><span class="section"><a href="#semantic-constraints">3.2.2.3. Semantic Constraints
- [CLHS-3.2.2.3]</a></span></dt></dl></dd><dt><span class="section"><a href="#similarity">3.2.3. Definition of Similarity
- [CLHS-3.2.4.2.2]</a></span></dt></dl></dd><dt><span class="section"><a href="#declarations">3.3. Declarations
- [CLHS-3.3]</a></span></dt><dd><dl><dt><span class="section"><a href="#spec-decl">3.3.1. Declaration <code class="literal">SPECIAL</code></a></span></dt><dt><span class="section"><a href="#safety-decl">3.3.2. Declaration <code class="literal">SAFETY</code></a></span></dt><dt><span class="section"><a href="#compile-decl">3.3.3. Declaration <code class="code">(COMPILE)</code></a></span></dt><dt><span class="section"><a href="#space-decl">3.3.4. Declaration <code class="literal">SPACE</code></a></span></dt></dl></dd><dt><span class="section"><a href="#lalist">3.4. Lambda Lists
- [CLHS-3.4]</a></span></dt><dd><dl><dt><span class="section"><a href="#boa-lalist">3.4.1. Boa Lambda Lists
- [CLHS-3.4.6]</a></span></dt></dl></dd><dt><span class="section"><a href="#eval-comp">3.5. The Evaluation and Compilation Dictionary
- [CLHS-3.8]</a></span></dt><dd><dl><dt><span class="section"><a href="#constantp">3.5.1. Function <code class="function">CONSTANTP</code></a></span></dt><dt><span class="section"><a href="#eval-when">3.5.2. Macro <code class="function">EVAL-WHEN</code></a></span></dt><dt><span class="section"><a href="#speop-the">3.5.3. Special operator <code class="function">THE</code></a></span></dt></dl></dd></dl></div><p>All the functions built by <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/speope_function.html" target="_top"><code class="function">FUNCTION</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_compile.html" target="_top"><code class="function">COMPILE</code></a> and the like are
- atoms. There are built-in functions written in <a class="ulink" href="http://www.eskimo.com/~scs/C-faq/top.html" target="_top"><span class="command"><strong>C</strong></span></a>, compiled
- functions (both of type <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_compiled-function.html" target="_top"><code class="classname">COMPILED-FUNCTION</code></a>) and interpreted
- functions (of type <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_function.html" target="_top"><code class="classname">FUNCTION</code></a>).</p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="evaluation"></a>3.1. Evaluation
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-1.html" target="_top">[CLHS-3.1]</a></h2></div></div></div><div class="toc"><dl><dt><span class="section"><a href="#eval-environ">3.1.1. Introduction to Environments
- [CLHS-3.1.1]</a></span></dt><dt><span class="section"><a href="#dyn-var">3.1.2. Dynamic Variables
- [CLHS-3.1.2.1.1.2]</a></span></dt><dt><span class="section"><a href="#function-form">3.1.3. Conses as Forms
- [CLHS-3.1.2.1.2]</a></span></dt></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="eval-environ"></a>3.1.1. Introduction to Environments
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-1-1.html" target="_top">[CLHS-3.1.1]</a></h3></div></div></div><p><a id="the-env"></a><b>Macro <a class="link" href="#the-env" title="Macro EXT:THE-ENVIRONMENT"><code class="function">EXT:THE-ENVIRONMENT</code></a>. </b>As in Scheme, the macro <code class="code">(<a class="link" href="#the-env" title="Macro EXT:THE-ENVIRONMENT"><code class="function">EXT:THE-ENVIRONMENT</code></a>)</code>
- returns the current <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-1-1-3.html" target="_top">lexical environment</a>. This works only in interpreted code and
- is not compilable!</p><p><a id="eval-env"></a><b>Function <code class="code">(EXT:EVAL-ENV
- <em class="replaceable"><code>form</code></em> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html" target="_top"><code class="literal">&OPTIONAL</code></a> <em class="replaceable"><code><a class="ulink" href="http://www.lisp.org/HyperSpec/sec_3-1-1-4.html" target="_top">environment</a></code></em>)</code>. </b>evaluates a form in a given <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-1-1-3.html" target="_top">lexical environment</a>, just as if the
- form had been a part of the program that the <em class="replaceable"><code><a class="ulink" href="http://www.lisp.org/HyperSpec/sec_3-1-1-4.html" target="_top">environment</a></code></em> came from.
- </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="dyn-var"></a>3.1.2. Dynamic Variables
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-1-2-1-1-2.html" target="_top">[CLHS-3.1.2.1.1.2]</a></h3></div></div></div><p>“<span class="quote">Undefined variables</span>”, i.e. <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-1-2-1-1.html" target="_top">variable</a>s which are
- referenced outside any lexical binding for a variable of the same name
- and which are not declared <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/dec_special.html" target="_top"><code class="literal">SPECIAL</code></a>, are treated like <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-1-2-1-1-2.html" target="_top">dynamic variable</a>s
- in the <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-1-1-1.html" target="_top">global environment</a>. The compiler <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_signal.html" target="_top"><code class="function">SIGNAL</code></a>s a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_warning.html" target="_top"><code class="classname">WARNING</code></a> when it
- encounters an undefined variable.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="function-form"></a>3.1.3. Conses as Forms
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-1-2-1-2.html" target="_top">[CLHS-3.1.2.1.2]</a></h3></div></div></div><p>Lists of the form <code class="code">((<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_setfcm_psetf.html" target="_top"><code class="function">SETF</code></a> <em class="replaceable"><code>symbol</code></em>) ...)</code> are also
- treated as function forms. This makes the syntax
- <code class="code">(<em class="replaceable"><code>function-name</code></em> <em class="replaceable"><code>arguments</code></em> ...)</code> consistent with the syntax
- <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_funcall.html" target="_top"><code class="function">FUNCALL</code></a> #'<em class="replaceable"><code>function-name</code></em> <em class="replaceable"><code>arguments</code></em> ...)</code>.
- It implements the item 7 of the [<span class="citation"><a class="link" href="#ansi-cl" title="ANSI Common Lisp standard X3.226-1994 - Information Technology - Programming Language - Common Lisp">ANSI CL standard</a></span>] issue <a class="ulink" href="http://www.lisp.org/HyperSpec/Issues/iss174.html" target="_top">FUNCTION-NAME:LARGE</a> and the definition of
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/glo_f.html#function_form" target="_top">function form</a>s,
- and is consistent with the use of <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/glo_f.html#function_name" target="_top">function name</a>s elsewhere in <a class="ulink" href="http://www.lisp.org" target="_top"><span class="command"><strong>Common Lisp</strong></span></a>.
- </p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="compilation"></a>3.2. Compilation
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-2.html" target="_top">[CLHS-3.2]</a></h2></div></div></div><div class="toc"><dl><dt><span class="section"><a href="#compiler-terms">3.2.1. Compiler Terminology
- [CLHS-3.2.1]</a></span></dt><dt><span class="section"><a href="#compilation-semantics">3.2.2. Compilation Semantics
- [CLHS-3.2.2]</a></span></dt><dd><dl><dt><span class="section"><a href="#compiler-macros">3.2.2.1. Compiler Macros
- [CLHS-3.2.2.1]</a></span></dt><dt><span class="section"><a href="#minimal-compilation">3.2.2.2. Minimal Compilation
- [CLHS-3.2.2.2]</a></span></dt><dt><span class="section"><a href="#semantic-constraints">3.2.2.3. Semantic Constraints
- [CLHS-3.2.2.3]</a></span></dt></dl></dd><dt><span class="section"><a href="#similarity">3.2.3. Definition of Similarity
- [CLHS-3.2.4.2.2]</a></span></dt></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="compiler-terms"></a>3.2.1. Compiler Terminology
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-2-1.html" target="_top">[CLHS-3.2.1]</a></h3></div></div></div><p><a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> compiles to platform-independent <a href="impnotes.html#bytecode" class="olink">bytecode</a>.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="compilation-semantics"></a>3.2.2. Compilation Semantics
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-2-2.html" target="_top">[CLHS-3.2.2]</a></h3></div></div></div><div class="toc"><dl><dt><span class="section"><a href="#compiler-macros">3.2.2.1. Compiler Macros
- [CLHS-3.2.2.1]</a></span></dt><dt><span class="section"><a href="#minimal-compilation">3.2.2.2. Minimal Compilation
- [CLHS-3.2.2.2]</a></span></dt><dt><span class="section"><a href="#semantic-constraints">3.2.2.3. Semantic Constraints
- [CLHS-3.2.2.3]</a></span></dt></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="compiler-macros"></a>3.2.2.1. Compiler Macros
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-2-2-1.html" target="_top">[CLHS-3.2.2.1]</a></h4></div></div></div><p>Compiler macros are expanded in the compiled code only, and
- ignored by the interpreter.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="minimal-compilation"></a>3.2.2.2. Minimal Compilation
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-2-2-2.html" target="_top">[CLHS-3.2.2.2]</a></h4></div></div></div><p>When a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defun.html" target="_top"><code class="function">DEFUN</code></a> form is <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_eval.html" target="_top"><code class="function">EVAL</code></a>uated, the macros used there are
- expanded, so they must be already defined, and their (re)definition
- does <span class="strong"><strong>not</strong></span> affect functions which are already defined.</p><p>This means that even the interpreted code is <span class="emphasis"><em>minimally
- compiled</em></span> in <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a>.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="semantic-constraints"></a>3.2.2.3. Semantic Constraints
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-2-2-3.html" target="_top">[CLHS-3.2.2.3]</a></h4></div></div></div><p>Non-conforming code that does not follow the rule
- </p><div class="blockquote"><blockquote class="blockquote"><p>“<span class="quote">Special proclamations for dynamic variables must
- be made in the compilation environment.</span>”</p></blockquote></div><p>
- can produce quite unexpected results, e.g., observable differences
- between <span class="emphasis"><em>compiled</em></span> and <span class="emphasis"><em>interpreted</em></span>
- programs:</p><pre class="programlisting">
- (defun adder-c (value) (declare (<a class="link" href="#compile-decl" title="3.3.3. Declaration (COMPILE)"><code class="code">(COMPILE)</code></a>)) (lambda (x) (+ x value)))
- ⇒ <code class="computeroutput">ADDER-C</code> ; compiled function; <em class="replaceable"><code>value</code></em> is lexical
- (defun adder-i (value) (lambda (x) (+ x value)))
- ⇒ <code class="computeroutput">ADDER-I</code> ; interpreted function; <em class="replaceable"><code>value</code></em> is lexical
- (setq add-c-10 (adder-c 10))
- ⇒ <code class="computeroutput">ADD-C-10</code> ; compiled function
- (setq add-i-10 (adder-i 10))
- ⇒ <code class="computeroutput">ADD-I-10</code> ; interpreted function
- (funcall add-c-10 32)
- ⇒ <code class="computeroutput">42</code> ; as expected
- (funcall add-i-10 32)
- ⇒ <code class="computeroutput">42</code> ; as expected
- (defvar value 12)
- ⇒ <code class="computeroutput">VALUE</code> ; affects <code class="function">ADDER-I</code> and <code class="function">ADD-I-10</code> but not <code class="function">ADDER-C</code> and <code class="function">ADD-C-10</code>
- (funcall add-c-10 32)
- ⇒ <code class="computeroutput">42</code> ; as before
- (funcall add-i-10 32)
- ⇒ <code class="computeroutput">44</code> ; <em class="replaceable"><code>value</code></em> is now dynamic!
- </pre><p><a id="semantic-constraints-non-conf"></a><b>Non-conformance. </b>The code shown above has a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/dec_special.html" target="_top"><code class="literal">SPECIAL</code></a> proclamation (by <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defparametercm_defvar.html" target="_top"><code class="function">DEFVAR</code></a>)
- for the variable <em class="replaceable"><code>value</code></em> in the execution environment
- (before the last two <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_funcall.html" target="_top"><code class="function">FUNCALL</code></a>s)
- but not in the compilation environment: at the moment
- the <code class="function">ADDER-I</code> function is defined,
- <em class="replaceable"><code>value</code></em> is not known to be a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/dec_special.html" target="_top"><code class="literal">SPECIAL</code></a> variable.
- Therefore the code is not conforming.</p><div class="simplesect" lang="en" xml:lang="en"><div class="titlepage"><div><div><h5 class="title"><a id="semantic-constraints-rationale"></a>Rationale</h5></div></div></div><p>The function <code class="function">ADD-C-10</code> was compiled <span class="strong"><strong>before</strong></span>
- <em class="replaceable"><code>value</code></em> was declared <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/dec_special.html" target="_top"><code class="literal">SPECIAL</code></a>, so the symbol <em class="replaceable"><code>value</code></em> was
- eliminated from its code and the <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/dec_special.html" target="_top"><code class="literal">SPECIAL</code></a> declaration did
- not affect the return value (i.e., <code class="code">(funcall
- add-c-10 32)</code> always returned <span class="returnvalue">42</span>).</p><p>On the opposite, function <code class="function">ADDER-I</code> was <span class="strong"><strong>not</strong></span>
- compiled, so <code class="function">ADD-I-10</code>
- was <span class="emphasis"><em>interpreted</em></span>.
- Whenever <code class="function">ADD-I-10</code> is executed, its definition is
- interpreted all over again. Before <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defparametercm_defvar.html" target="_top"><code class="function">DEFVAR</code></a>, <em class="replaceable"><code>value</code></em> is evaluated as
- a lexical (because is is <span class="strong"><strong>not</strong></span> declared <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/dec_special.html" target="_top"><code class="literal">SPECIAL</code></a> yet), but after
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defparametercm_defvar.html" target="_top"><code class="function">DEFVAR</code></a>, we see a globally <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/dec_special.html" target="_top"><code class="literal">SPECIAL</code></a> symbol <em class="replaceable"><code>value</code></em> which
- can have only a global <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/acc_symbol-value.html" target="_top"><code class="function">SYMBOL-VALUE</code></a> (not a local binding), and thus
- we are compelled to evaluate it to <span class="returnvalue">12</span>.</p><p>This behavior was implemented intentionally to ease interactive
- development, because <span class="emphasis"><em>usually</em></span>
- the <code class="function">ADDER-I</code> above would be followed by a
- (forgotten) <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defparametercm_defvar.html" target="_top"><code class="function">DEFVAR</code></a>.</p><p>When a user compiles a program, the compiler is allowed to
- remember the information whether a variable was <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/dec_special.html" target="_top"><code class="literal">SPECIAL</code></a> or not,
- because that allows the compiler to generate more efficient code,
- but in interpreted code, when the user changes the state of a variable,
- he does <span class="strong"><strong>not</strong></span> want to re-evaluate all <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defun.html" target="_top"><code class="function">DEFUN</code></a>s that use the variable.</p><p>[<span class="citation"><a class="link" href="#ansi-cl" title="ANSI Common Lisp standard X3.226-1994 - Information Technology - Programming Language - Common Lisp">ANSI CL standard</a></span>] gives the implementation freedom regarding
- interpreted evaluation, how much it wants to remember / cache, and how
- much it wants to evaluate according the current environment, if the
- environment has changed. <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> implements <span class="emphasis"><em>ad-hoc
- look-up</em></span> for variables (but <span class="strong"><strong>not</strong></span> for macros, see
- <a class="xref" href="#minimal-compilation" title="3.2.2.2. Minimal Compilation [CLHS-3.2.2.2]">Section 3.2.2.2, “Minimal Compilation
- [CLHS-3.2.2.2]”</a>).</p></div></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="similarity"></a>3.2.3. Definition of Similarity
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-2-4-2-2.html" target="_top">[CLHS-3.2.4.2.2]</a></h3></div></div></div><p>Hash tables are <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-2-4-1.html" target="_top">externalizable object</a>s.</p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="declarations"></a>3.3. Declarations
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-3.html" target="_top">[CLHS-3.3]</a></h2></div></div></div><div class="toc"><dl><dt><span class="section"><a href="#spec-decl">3.3.1. Declaration <code class="literal">SPECIAL</code></a></span></dt><dt><span class="section"><a href="#safety-decl">3.3.2. Declaration <code class="literal">SAFETY</code></a></span></dt><dt><span class="section"><a href="#compile-decl">3.3.3. Declaration <code class="code">(COMPILE)</code></a></span></dt><dt><span class="section"><a href="#space-decl">3.3.4. Declaration <code class="literal">SPACE</code></a></span></dt></dl></div><p>The declarations <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/dec_type.html" target="_top"><code class="literal">TYPE</code></a> <em class="replaceable"><code>type</code></em> <em class="replaceable"><code>variable</code></em> ...)</code>,
- <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/dec_ftype.html" target="_top"><code class="literal">FTYPE</code></a> <em class="replaceable"><code>type</code></em> <em class="replaceable"><code>function</code></em> ...)</code>,
- are ignored by both the interpreter and the compiler.</p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="spec-decl"></a>3.3.1. Declaration <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/dec_special.html" target="_top"><code class="literal">SPECIAL</code></a></h3></div></div></div><p><a id="notspec-decl"></a><b>Declaration <a class="link" href="#notspec-decl" title="Declaration EXT:NOTSPECIAL"><code class="literal">EXT:NOTSPECIAL</code></a>. </b>Declarations <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_proclaim.html" target="_top"><code class="function">PROCLAIM</code></a> '(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/dec_special.html" target="_top"><code class="literal">SPECIAL</code></a> <em class="replaceable"><code>variable</code></em>))</code>
- and <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defconstant.html" target="_top"><code class="function">DEFCONSTANT</code></a> are undone by the <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_proclaim.html" target="_top"><code class="function">PROCLAIM</code></a> '(<a class="link" href="#notspec-decl" title="Declaration EXT:NOTSPECIAL"><code class="literal">EXT:NOTSPECIAL</code></a>
- <em class="replaceable"><code>variable</code></em>))</code> declaration. This declaration can be used only in
- global <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_proclaim.html" target="_top"><code class="function">PROCLAIM</code></a> and <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_declaim.html" target="_top"><code class="function">DECLAIM</code></a> forms, not in local <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sym_declare.html" target="_top"><code class="function">DECLARE</code></a> forms.
- Of course, you cannot expect miracles: functions compiled before the
- <a class="link" href="#notspec-decl" title="Declaration EXT:NOTSPECIAL"><code class="literal">EXT:NOTSPECIAL</code></a> proclamation was issued will still be treating <em class="replaceable"><code>variable</code></em> as
- special even after the <a class="link" href="#notspec-decl" title="Declaration EXT:NOTSPECIAL"><code class="literal">EXT:NOTSPECIAL</code></a> proclamation.</p><p><a id="spe-var-p"></a><b>Function <a class="link" href="#spe-var-p" title="Function EXT:SPECIAL-VARIABLE-P"><code class="function">EXT:SPECIAL-VARIABLE-P</code></a>. </b>You can use the function <code class="code">(<a class="link" href="#spe-var-p" title="Function EXT:SPECIAL-VARIABLE-P"><code class="function">EXT:SPECIAL-VARIABLE-P</code></a> <em class="replaceable"><code>symbol</code></em>
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html" target="_top"><code class="literal">&OPTIONAL</code></a> <em class="replaceable"><code><a class="ulink" href="http://www.lisp.org/HyperSpec/sec_3-1-1-4.html" target="_top">environment</a></code></em>)</code> to check whether the symbol is a
- special variable. <em class="replaceable"><code><a class="ulink" href="http://www.lisp.org/HyperSpec/sec_3-1-1-4.html" target="_top">environment</a></code></em> of <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_nil.html" target="_top"><code class="constant">NIL</code></a> or omitted means use the <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-1-1-1.html" target="_top">global environment</a>.
- You can also obtain the current <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-1-1-3.html" target="_top">lexical environment</a> using the macro
- <a class="link" href="#the-env" title="Macro EXT:THE-ENVIRONMENT"><code class="function">EXT:THE-ENVIRONMENT</code></a> (interpreted code only).
- This function will always return <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_t.html" target="_top"><code class="constant">T</code></a> for global special
- variables and <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-1-2-1-1-3.html" target="_top">constant variable</a>s.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="safety-decl"></a>3.3.2. Declaration <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/dec_optimize.html" target="_top"><code class="literal">SAFETY</code></a></h3></div></div></div><p>Declaration <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/dec_optimize.html" target="_top"><code class="literal">OPTIMIZE</code></a> (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/dec_optimize.html" target="_top"><code class="literal">SAFETY</code></a> 3))</code>
- results in “<span class="quote">safe</span>” compiled code: function calls are never
- eliminated. This guarantees the semantics described in [<span class="citation"><a class="link" href="#ansi-cl" title="ANSI Common Lisp standard X3.226-1994 - Information Technology - Programming Language - Common Lisp">ANSI CL standard</a></span>]
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-5.html" target="_top">Section 3.5</a>.
- </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="compile-decl"></a>3.3.3. Declaration <a class="link" href="#compile-decl" title="3.3.3. Declaration (COMPILE)"><code class="code">(COMPILE)</code></a></h3></div></div></div><p>The declaration <a class="link" href="#compile-decl" title="3.3.3. Declaration (COMPILE)"><code class="code">(COMPILE)</code></a> has the effect that the current
- form is compiled prior to execution. Examples:
- </p><pre class="programlisting">
- (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/speope_locally.html" target="_top"><code class="function">LOCALLY</code></a> (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sym_declare.html" target="_top"><code class="function">DECLARE</code></a> (compile)) <em class="replaceable"><code>form</code></em>)
- </pre><p>
- executes a compiled version of <em class="replaceable"><code>form</code></em>.</p><pre class="programlisting">
- (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/speope_letcm_letst.html" target="_top"><code class="function">LET</code></a> ((x 0))
- (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/speope_fletcm_scm_macrolet.html" target="_top"><code class="function">FLET</code></a> ((inc () (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sym_declare.html" target="_top"><code class="function">DECLARE</code></a> (compile)) (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_incfcm_decf.html" target="_top"><code class="function">INCF</code></a> x))
- (dec () (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_incfcm_decf.html" target="_top"><code class="function">DECF</code></a> x)))
- (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/acc_values.html" target="_top"><code class="function">VALUES</code></a> #'inc #'dec)))
- </pre><p>
- returns two functions. The first is compiled and increments <em class="replaceable"><code>x</code></em>, the
- second is interpreted (slower) and decrements the same <em class="replaceable"><code>x</code></em>.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="space-decl"></a>3.3.4. Declaration <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/dec_optimize.html" target="_top"><code class="literal">SPACE</code></a></h3></div></div></div><p>The declaration determines what metadata is recorded in the
- function object:</p><div class="variablelist"><dl><dt><span class="term"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/dec_optimize.html" target="_top"><code class="literal">SPACE</code></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_eqcm_sleq__lteqcm_gteq.html" target="_top"><code class="function">>=</code></a> 2</span></dt><dd>documentation string is discarded
- </dd><dt><span class="term"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/dec_optimize.html" target="_top"><code class="literal">SPACE</code></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_eqcm_sleq__lteqcm_gteq.html" target="_top"><code class="function">>=</code></a> 3</span></dt><dd>the original <a class="link" href="#lalist" title="3.4. Lambda Lists [CLHS-3.4]">lambda list</a> is also discarded (most
- information is still available, see <a href="impnotes.html#describe" class="olink"><code class="function">DESCRIBE</code></a>, but the names of
- the positional arguments are not).</dd></dl></div></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="lalist"></a>3.4. Lambda Lists
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-4.html" target="_top">[CLHS-3.4]</a></h2></div></div></div><div class="toc"><dl><dt><span class="section"><a href="#boa-lalist">3.4.1. Boa Lambda Lists
- [CLHS-3.4.6]</a></span></dt></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="boa-lalist"></a>3.4.1. Boa Lambda Lists
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-4-6.html" target="_top">[CLHS-3.4.6]</a></h3></div></div></div><p>The initial value of an <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html" target="_top"><code class="literal">&AUX</code></a> variable in a boa <a class="link" href="#lalist" title="3.4. Lambda Lists [CLHS-3.4]">lambda list</a> is
- the value of the corresponding slot's initial form.</p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="eval-comp"></a>3.5. The Evaluation and Compilation Dictionary
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_the_evalu_n_dictionary.html" target="_top">[CLHS-3.8]</a></h2></div></div></div><div class="toc"><dl><dt><span class="section"><a href="#constantp">3.5.1. Function <code class="function">CONSTANTP</code></a></span></dt><dt><span class="section"><a href="#eval-when">3.5.2. Macro <code class="function">EVAL-WHEN</code></a></span></dt><dt><span class="section"><a href="#speop-the">3.5.3. Special operator <code class="function">THE</code></a></span></dt></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="constantp"></a>3.5.1. Function <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_constantp.html" target="_top"><code class="function">CONSTANTP</code></a></h3></div></div></div><p>Function <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_constantp.html" target="_top"><code class="function">CONSTANTP</code></a> fully complies with [<span class="citation"><a class="link" href="#ansi-cl" title="ANSI Common Lisp standard X3.226-1994 - Information Technology - Programming Language - Common Lisp">ANSI CL standard</a></span>].
- Additionally, some non-trivial forms are identified as constants, e.g.,
- <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_constantp.html" target="_top"><code class="function">CONSTANTP</code></a> '(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_pl.html" target="_top"><code class="function">+</code></a> 1 2 3))</code> returns <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_t.html" target="_top"><code class="constant">T</code></a>.</p><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>Since <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defconstant.html" target="_top"><code class="function">DEFCONSTANT</code></a> initial value forms are not
- evaluated at compile time, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_constantp.html" target="_top"><code class="function">CONSTANTP</code></a> will not report <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_t.html" target="_top"><code class="constant">T</code></a> of their
- name within the same <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/glo_c.html#compilation_unit" target="_top">compilation unit</a> for the null <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-1-1-3.html" target="_top">lexical environment</a>. This is
- consistent and matches questionable code using the pattern
- <code class="code">(if (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_constantp.html" target="_top"><code class="function">CONSTANTP</code></a> <em class="replaceable"><code>form</code></em>) (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_eval.html" target="_top"><code class="function">EVAL</code></a> <em class="replaceable"><code>form</code></em>))</code>. Use
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/speope_eval-when.html" target="_top"><code class="function">EVAL-WHEN</code></a> if you need recognition and the value during
- compile-time.</p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="eval-when"></a>3.5.2. Macro <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/speope_eval-when.html" target="_top"><code class="function">EVAL-WHEN</code></a></h3></div></div></div><p><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/speope_eval-when.html" target="_top"><code class="function">EVAL-WHEN</code></a> also accepts the situations <code class="code">(NOT EVAL)</code>
- and <code class="code">(NOT COMPILE)</code>.</p><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>The situations <code class="constant">EVAL</code>,
- <code class="constant">LOAD</code> and <code class="constant">COMPILE</code> are
- deprecated by the [<span class="citation"><a class="link" href="#ansi-cl" title="ANSI Common Lisp standard X3.226-1994 - Information Technology - Programming Language - Common Lisp">ANSI CL standard</a></span>], and they are <span class="strong"><strong>not</strong></span> equivalent to the new
- standard situations <code class="constant">:EXECUTE</code>,
- <code class="constant">:LOAD-TOPLEVEL</code>
- and <code class="constant">:COMPILE-TOPLEVEL</code> in that they ignore the
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-2-3-1.html" target="_top">top-level form</a> versus non-<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-2-3-1.html" target="_top">top-level form</a> distinction.</p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="speop-the"></a>3.5.3. Special operator <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/speope_the.html" target="_top"><code class="function">THE</code></a></h3></div></div></div><p>The special form <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/speope_the.html" target="_top"><code class="function">THE</code></a> <em class="replaceable"><code>value-type</code></em> <em class="replaceable"><code>form</code></em>)</code> is
- similar to <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_check-type.html" target="_top"><code class="function">CHECK-TYPE</code></a> but does a type check only in interpreted
- code (no type check is done in compiled code - but see the <a class="link" href="#ethe" title="31.11.1. Macro EXT:ETHE"><code class="function">EXT:ETHE</code></a>
- macro) and does not allow interactive error correction by the user.
- </p></div></div></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="types-classes"></a>Chapter 4. Types and Classes
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/chap-4.html" target="_top">[CLHS-4]</a></h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#types">4.1. Types
- [CLHS-4.2]</a></span></dt><dd><dl><dt><span class="section"><a href="#type-spec">4.1.1. Type Specifiers
- [CLHS-4.2.3]</a></span></dt></dl></dd><dt><span class="section"><a href="#classes">4.2. Classes
- [CLHS-4.3]</a></span></dt><dt><span class="section"><a href="#clos-diff">4.3. Deviations from ANSI CL standard</a></span></dt><dt><span class="section"><a href="#metaclasses">4.4. Standard Metaclasses
- [CLHS-4.3.1.1]</a></span></dt><dt><span class="section"><a href="#def-class">4.5. Defining Classes
- [CLHS-4.3.2]</a></span></dt><dt><span class="section"><a href="#redef-class">4.6. Redefining Classes
- [CLHS-4.3.6]</a></span></dt><dt><span class="section"><a href="#type-class-dict">4.7. The Types and Classes Dictionary
- [CLHS-4.4]</a></span></dt><dd><dl><dt><span class="section"><a href="#fixnum-char-ansi">4.7.1. Function <code class="function">COERCE</code></a></span></dt></dl></dd></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="types"></a>4.1. Types
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_4-2.html" target="_top">[CLHS-4.2]</a></h2></div></div></div><div class="toc"><dl><dt><span class="section"><a href="#type-spec">4.1.1. Type Specifiers
- [CLHS-4.2.3]</a></span></dt></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="type-spec"></a>4.1.1. Type Specifiers
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_4-2-3.html" target="_top">[CLHS-4.2.3]</a></h3></div></div></div><p>The general form of the <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_complex.html" target="_top"><code class="classname">COMPLEX</code></a> type specifier is <span class="type"><code class="literal">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_complex.html" target="_top"><code class="classname">COMPLEX</code></a> <em class="replaceable"><code>type-of-real-part</code></em>
- <em class="replaceable"><code>type-of-imaginary-part</code></em>)</code></span>. The type
- specifier <span class="type"><code class="literal">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_complex.html" target="_top"><code class="classname">COMPLEX</code></a> <em class="replaceable"><code>type</code></em>)</code></span> is
- equivalent to <span class="type"><code class="literal">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_complex.html" target="_top"><code class="classname">COMPLEX</code></a> <em class="replaceable"><code>type</code></em>
- <em class="replaceable"><code>type</code></em>)</code></span>.</p><p><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_deftype.html" target="_top"><code class="function">DEFTYPE</code></a> <a class="link" href="#lalist" title="3.4. Lambda Lists [CLHS-3.4]">lambda list</a>s are subject to destructuring (nested <a class="link" href="#lalist" title="3.4. Lambda Lists [CLHS-3.4]">lambda list</a>s
- are allowed, as in <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defmacro.html" target="_top"><code class="function">DEFMACRO</code></a>) and may contain a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-4-4.html" target="_top"><code class="literal">&WHOLE</code></a> marker,
- but not an <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-4-4.html" target="_top"><code class="literal">&ENVIRONMENT</code></a> marker.</p><p><b>Function <code class="code">(<code class="function">EXT:TYPE-EXPAND</code>
- <em class="replaceable"><code>typespec</code></em> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html" target="_top"><code class="literal">&OPTIONAL</code></a>
- <em class="replaceable"><code>once-p</code></em>)</code>. </b>If <em class="replaceable"><code>typespec</code></em> is a user-defined type,
- this will expand it recursively until it is no longer a user-defined
- type (unless <em class="replaceable"><code>once-p</code></em> is supplied and
- non-<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_nil.html" target="_top"><code class="constant">NIL</code></a>). Two values are returned - the expansion and an indicator
- (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_t.html" target="_top"><code class="constant">T</code></a> or <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_nil.html" target="_top"><code class="constant">NIL</code></a>) of whether the original
- <em class="replaceable"><code>typespec</code></em> was a user-defined type.
- </p><div class="itemizedlist"><p class="title"><b>The possible results of <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_type-of.html" target="_top"><code class="function">TYPE-OF</code></a></b></p><ul type="disc"><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_cons.html" target="_top"><code class="classname">CONS</code></a></li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_symbol.html" target="_top"><code class="classname">SYMBOL</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_null.html" target="_top"><code class="classname">NULL</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_boolean.html" target="_top"><code class="classname">BOOLEAN</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_keyword.html" target="_top"><code class="classname">KEYWORD</code></a></li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_bit.html" target="_top"><code class="classname">BIT</code></a>, <span class="type"><code class="literal">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_integer.html" target="_top"><code class="classname">INTEGER</code></a> 0
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8-6.html" target="_top"><span class="data"><code class="literal">#.</code></span></a><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_most-p_ative-fixnum.html" target="_top"><code class="constant">MOST-POSITIVE-FIXNUM</code></a>)</code></span>,
- <span class="type"><code class="literal">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_integer.html" target="_top"><code class="classname">INTEGER</code></a>
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8-6.html" target="_top"><span class="data"><code class="literal">#.</code></span></a><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_most-p_ative-fixnum.html" target="_top"><code class="constant">MOST-NEGATIVE-FIXNUM</code></a> (0))</code></span>,
- <span class="type"><code class="literal">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_integer.html" target="_top"><code class="classname">INTEGER</code></a>
- (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8-6.html" target="_top"><span class="data"><code class="literal">#.</code></span></a><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_most-p_ative-fixnum.html" target="_top"><code class="constant">MOST-POSITIVE-FIXNUM</code></a>))</code></span>,
- <span class="type"><code class="literal">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_integer.html" target="_top"><code class="classname">INTEGER</code></a> *
- (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8-6.html" target="_top"><span class="data"><code class="literal">#.</code></span></a><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_most-p_ative-fixnum.html" target="_top"><code class="constant">MOST-NEGATIVE-FIXNUM</code></a>))</code></span></li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_rational.html" target="_top"><code class="classname">RATIONAL</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_short-flo_m_long-float.html" target="_top"><code class="classname">SHORT-FLOAT</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_short-flo_m_long-float.html" target="_top"><code class="classname">SINGLE-FLOAT</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_short-flo_m_long-float.html" target="_top"><code class="classname">DOUBLE-FLOAT</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_short-flo_m_long-float.html" target="_top"><code class="classname">LONG-FLOAT</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_complex.html" target="_top"><code class="classname">COMPLEX</code></a></li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_character.html" target="_top"><code class="classname">CHARACTER</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_base-char.html" target="_top"><code class="classname">BASE-CHAR</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_standard-char.html" target="_top"><code class="classname">STANDARD-CHAR</code></a></li><li><span class="type"><code class="literal">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_array.html" target="_top"><code class="classname">ARRAY</code></a> <em class="replaceable"><code>element-type</code></em>
- <em class="replaceable"><code>dimensions</code></em>)</code></span>, <span class="type"><code class="literal">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_simple-array.html" target="_top"><code class="classname">SIMPLE-ARRAY</code></a>
- <em class="replaceable"><code>element-type</code></em> <em class="replaceable"><code>dimensions</code></em>)</code></span></li><li><span class="type"><code class="literal">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_vector.html" target="_top"><code class="classname">VECTOR</code></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_t.html" target="_top"><code class="constant">T</code></a>
- <em class="replaceable"><code>size</code></em>)</code></span>, <span class="type"><code class="literal">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_simple-vector.html" target="_top"><code class="classname">SIMPLE-VECTOR</code></a>
- <em class="replaceable"><code>size</code></em>)</code></span></li><li><span class="type"><code class="literal">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_string.html" target="_top"><code class="classname">STRING</code></a>
- <em class="replaceable"><code>size</code></em>)</code></span>, <span class="type"><code class="literal">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_simple-string.html" target="_top"><code class="classname">SIMPLE-STRING</code></a>
- <em class="replaceable"><code>size</code></em>)</code></span></li><li><span class="type"><code class="literal">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_base-string.html" target="_top"><code class="classname">BASE-STRING</code></a>
- <em class="replaceable"><code>size</code></em>)</code></span>, <span class="type"><code class="literal">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_simple-base-string.html" target="_top"><code class="classname">SIMPLE-BASE-STRING</code></a>
- <em class="replaceable"><code>size</code></em>)</code></span></li><li><span class="type"><code class="literal">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_bit-vector.html" target="_top"><code class="classname">BIT-VECTOR</code></a>
- <em class="replaceable"><code>size</code></em>)</code></span>, <span class="type"><code class="literal">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_simple-bit-vector.html" target="_top"><code class="classname">SIMPLE-BIT-VECTOR</code></a>
- <em class="replaceable"><code>size</code></em>)</code></span></li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_function.html" target="_top"><code class="classname">FUNCTION</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_compiled-function.html" target="_top"><code class="classname">COMPILED-FUNCTION</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_standa_ric-function.html" target="_top"><code class="classname">STANDARD-GENERIC-FUNCTION</code></a></li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_stream.html" target="_top"><code class="classname">STREAM</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_file-stream.html" target="_top"><code class="classname">FILE-STREAM</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_synonym-stream.html" target="_top"><code class="classname">SYNONYM-STREAM</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_broadcast-stream.html" target="_top"><code class="classname">BROADCAST-STREAM</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_concatenated-stream.html" target="_top"><code class="classname">CONCATENATED-STREAM</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_two-way-stream.html" target="_top"><code class="classname">TWO-WAY-STREAM</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_echo-stream.html" target="_top"><code class="classname">ECHO-STREAM</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_string-stream.html" target="_top"><code class="classname">STRING-STREAM</code></a></li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_package.html" target="_top"><code class="classname">PACKAGE</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_hash-table.html" target="_top"><code class="classname">HASH-TABLE</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_readtable.html" target="_top"><code class="classname">READTABLE</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_pathname.html" target="_top"><code class="classname">PATHNAME</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_logical-pathname.html" target="_top"><code class="classname">LOGICAL-PATHNAME</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_random-state.html" target="_top"><code class="classname">RANDOM-STATE</code></a>, <a class="link" href="#byte-type" title="12.2.1. Byte Operations on Integers [CLHS-12.1.1.3.2]"><span class="type">BYTE</span></a></li><li><code class="classname">SPECIAL-OPERATOR</code>,
- <code class="classname">LOAD-TIME-EVAL</code>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_define-symbol-macro.html" target="_top"><code class="classname">SYMBOL-MACRO</code></a>,
- <code class="classname">GLOBAL-SYMBOL-MACRO</code>, <a class="link" href="#encoding" title="31.5. Encodings"><code class="classname">EXT:ENCODING</code></a>,
- <a class="link" href="#fptr"><code class="classname">FFI:FOREIGN-POINTER</code></a>, <a class="link" href="#faddr"><code class="classname">FFI:FOREIGN-ADDRESS</code></a>, <a class="link" href="#dffi-variables" title="32.3.5. Foreign variables"><code class="classname">FFI:FOREIGN-VARIABLE</code></a>,
- <a class="link" href="#dffi" title="32.3. The Foreign Function Call Facility"><code class="classname">FFI:FOREIGN-FUNCTION</code></a></li><li><a class="link" href="#weak-pointer" title="31.7.1. Weak Pointers"><code class="classname">EXT:WEAK-POINTER</code></a>, <a class="link" href="#weak-list" title="31.7.2. Weak Lists"><code class="classname">EXT:WEAK-LIST</code></a>, <a class="link" href="#weak-and-relation" title="31.7.3. Weak And Relations"><code class="classname">EXT:WEAK-AND-RELATION</code></a>,
- <a class="link" href="#weak-or-relation" title="31.7.4. Weak Or Relations"><code class="classname">EXT:WEAK-OR-RELATION</code></a>, <a class="link" href="#weak-mapping" title="31.7.5. Weak Associations"><code class="classname">EXT:WEAK-MAPPING</code></a>, <a class="link" href="#weak-and-mapping" title="31.7.6. Weak And Mappings"><code class="classname">EXT:WEAK-AND-MAPPING</code></a>,
- <a class="link" href="#weak-or-mapping" title="31.7.7. Weak Or Mappings"><code class="classname">EXT:WEAK-OR-MAPPING</code></a>, <a class="link" href="#weak-alist" title="31.7.8. Weak Association Lists"><code class="classname">EXT:WEAK-ALIST</code></a>,
- <a class="link" href="#reader" title="Chapter 23. Reader [CLHS-23]"><code class="classname">READ-LABEL</code></a>,
- <a class="link" href="#reader" title="Chapter 23. Reader [CLHS-23]"><code class="classname">FRAME-POINTER</code></a>,
- <code class="classname">SYSTEM-INTERNAL</code></li><li><code class="classname">ADDRESS</code> (should not
- occur)</li><li>any other <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_symbol.html" target="_top"><code class="classname">SYMBOL</code></a> (structure types or <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/chap-7.html" target="_top"><span class="command"><strong>CLOS</strong></span></a>
- classes)</li><li>a class object (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/chap-7.html" target="_top"><span class="command"><strong>CLOS</strong></span></a> classes without a
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/glo_p.html#proper_name" target="_top">proper name</a>)</li></ul></div></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="classes"></a>4.2. Classes
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_4-3.html" target="_top">[CLHS-4.3]</a></h2></div></div></div><p>The <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/chap-7.html" target="_top"><span class="command"><strong>CLOS</strong></span></a> symbols are <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_export.html" target="_top"><code class="function">EXPORT</code></a>ed from the package <a class="link" href="#classes" title="4.2. Classes [CLHS-4.3]"><strong class="package">“<span class="quote">CLOS</span>”</strong></a>.
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_11-1-2-1.html" target="_top"><strong class="package">“<span class="quote">COMMON-LISP</span>”</strong></a> uses (as in <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_use-package.html" target="_top"><code class="function">USE-PACKAGE</code></a>) <a class="link" href="#classes" title="4.2. Classes [CLHS-4.3]"><strong class="package">“<span class="quote">CLOS</span>”</strong></a> and <a class="link" href="#re-export" title="11.5.3. Function EXT:RE-EXPORT"><code class="function">EXT:RE-EXPORT</code></a>s the
- [<span class="citation"><a class="link" href="#ansi-cl" title="ANSI Common Lisp standard X3.226-1994 - Information Technology - Programming Language - Common Lisp">ANSI CL standard</a></span>] standard exported symbols (the <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> extensions, e.g.,
- those described in <a class="xref" href="#mop-chap" title="Chapter 29. Meta-Object Protocol">Chapter 29, <i>Meta-Object Protocol</i></a>, are <span class="strong"><strong>not</strong></span> <a class="link" href="#re-export" title="11.5.3. Function EXT:RE-EXPORT"><code class="function">EXT:RE-EXPORT</code></a>ed).
- Since <a class="link" href="#make-pack" title="11.5.1. Function MAKE-PACKAGE">the default <code class="constant">:USE</code> argument</a>
- to <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_make-package.html" target="_top"><code class="function">MAKE-PACKAGE</code></a> is <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_11-1-2-1.html" target="_top"><strong class="package">“<span class="quote">COMMON-LISP</span>”</strong></a>, the standard <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/chap-7.html" target="_top"><span class="command"><strong>CLOS</strong></span></a> symbols are normally
- visible in all user-defined packages.
- If you do not want them (for example, if you want to use the
- <a class="ulink" href="ftp://ftp.gnu.org/pub/gnu/clisp/packages/pcl.sept92f.clisp.tar.gz" target="_top">PCL</a>
- implementation of <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/chap-7.html" target="_top"><span class="command"><strong>CLOS</strong></span></a> instead of the native one), do the following:
- </p><pre class="programlisting">
- (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defpackage.html" target="_top"><code class="function">DEFPACKAGE</code></a> "CL-NO-CLOS" (:use "CL"))
- (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_do-symbol_-all-symbols.html" target="_top"><code class="function">DO-EXTERNAL-SYMBOLS</code></a> (<em class="replaceable"><code>symbol</code></em> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_11-1-2-1.html" target="_top"><strong class="package">“<span class="quote">COMMON-LISP</span>”</strong></a>)
- (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_shadow.html" target="_top"><code class="function">SHADOW</code></a> <em class="replaceable"><code>symbol</code></em> "CL-NO-CLOS"))
- (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_do-symbol_-all-symbols.html" target="_top"><code class="function">DO-SYMBOLS</code></a> (<em class="replaceable"><code>symbol</code></em> "CL-NO-CLOS")
- (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_export.html" target="_top"><code class="function">EXPORT</code></a> <em class="replaceable"><code>symbol</code></em> "CL-NO-CLOS"))
- (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_in-package.html" target="_top"><code class="function">IN-PACKAGE</code></a> "CL-NO-CLOS")
- (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_load.html" target="_top"><code class="function">LOAD</code></a> "pcl") ; or whatever
- (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defpackage.html" target="_top"><code class="function">DEFPACKAGE</code></a> "MY-USER" (:use "CL-NO-CLOS"))
- (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_in-package.html" target="_top"><code class="function">IN-PACKAGE</code></a> "MY-USER")
- ;; your code which uses PCL goes here
- </pre></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="clos-diff"></a>4.3. Deviations from [<span class="citation"><a class="link" href="#ansi-cl" title="ANSI Common Lisp standard X3.226-1994 - Information Technology - Programming Language - Common Lisp">ANSI CL standard</a></span>]</h2></div></div></div><p><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defclass.html" target="_top"><code class="function">DEFCLASS</code></a> supports the option <code class="constant">:METACLASS</code> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_structure-class.html" target="_top"><code class="classname">STRUCTURE-CLASS</code></a>.
- This option is necessary in order to define a subclass of a
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defstruct.html" target="_top"><code class="function">DEFSTRUCT</code></a>-defined structure type using <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defclass.html" target="_top"><code class="function">DEFCLASS</code></a> instead of
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defstruct.html" target="_top"><code class="function">DEFSTRUCT</code></a>.</p><p>When <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/locfun_call-next-method.html" target="_top"><code class="function">CALL-NEXT-METHOD</code></a> is called with arguments, the rule that
- the ordered set of applicable methods must be the same as for the
- original arguments is enforced by the implementation only in
- interpreted code.</p><p><strong class="first"><em class="firstterm"><a class="link" href="#gen-flet"><code class="function">CLOS:GENERIC-FLET</code></a><a id="gen-flet" class="indexterm"></a></em></strong> and
- <strong class="first"><em class="firstterm"><a class="link" href="#gen-labels"><code class="function">CLOS:GENERIC-LABELS</code></a><a id="gen-labels" class="indexterm"></a></em></strong>
- are implemented as macros, not as special operators (as permitted by
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-1-2-1-2-2.html" target="_top">Section 3.1.2.1.2.2</a>).
- They are not imported into the packages <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_11-1-2-2.html" target="_top"><strong class="package">“<span class="quote">COMMON-LISP-USER</span>”</strong></a> and <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_11-1-2-1.html" target="_top"><strong class="package">“<span class="quote">COMMON-LISP</span>”</strong></a> because
- of the [<span class="citation"><a class="link" href="#ansi-cl" title="ANSI Common Lisp standard X3.226-1994 - Information Technology - Programming Language - Common Lisp">ANSI CL standard</a></span>] issue <a class="ulink" href="http://www.lisp.org/HyperSpec/Issues/iss181.html" target="_top">GENERIC-FLET-POORLY-DESIGNED:DELETE</a>.</p><p><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/stagenfun_print-object.html" target="_top"><code class="function">PRINT-OBJECT</code></a> is only called on objects of type
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/cla_standard-object.html" target="_top"><code class="classname">STANDARD-OBJECT</code></a> and <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/cla_structure-object.html" target="_top"><code class="classname">STRUCTURE-OBJECT</code></a>.
- It is not called on other objects, like <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_cons.html" target="_top"><code class="classname">CONS</code></a>es
- and <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_number.html" target="_top"><code class="classname">NUMBER</code></a>s, due to the performance concerns.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="metaclasses"></a>4.4. Standard Metaclasses
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_4-3-1-1.html" target="_top">[CLHS-4.3.1.1]</a></h2></div></div></div><p>Among those classes listed in <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_4-3-7.html#classtypecorrespondence" target="_top">Figure
- 4-8</a>, only the following are instances of <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_built-in-class.html" target="_top"><code class="classname">BUILT-IN-CLASS</code></a>:
- </p><div class="itemizedlist"><ul type="disc"><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_t.html" target="_top"><code class="classname">T</code></a></li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_character.html" target="_top"><code class="classname">CHARACTER</code></a></li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_number.html" target="_top"><code class="classname">NUMBER</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_complex.html" target="_top"><code class="classname">COMPLEX</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_real.html" target="_top"><code class="classname">REAL</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_float.html" target="_top"><code class="classname">FLOAT</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_rational.html" target="_top"><code class="classname">RATIONAL</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_ratio.html" target="_top"><code class="classname">RATIO</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_integer.html" target="_top"><code class="classname">INTEGER</code></a></li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_sequence.html" target="_top"><code class="classname">SEQUENCE</code></a></li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_array.html" target="_top"><code class="classname">ARRAY</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_vector.html" target="_top"><code class="classname">VECTOR</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_bit-vector.html" target="_top"><code class="classname">BIT-VECTOR</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_string.html" target="_top"><code class="classname">STRING</code></a></li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_list.html" target="_top"><code class="classname">LIST</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_cons.html" target="_top"><code class="classname">CONS</code></a></li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_symbol.html" target="_top"><code class="classname">SYMBOL</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_null.html" target="_top"><code class="classname">NULL</code></a></li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_function.html" target="_top"><code class="classname">FUNCTION</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_generic-function.html" target="_top"><code class="classname">GENERIC-FUNCTION</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_standa_ric-function.html" target="_top"><code class="classname">STANDARD-GENERIC-FUNCTION</code></a></li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_hash-table.html" target="_top"><code class="classname">HASH-TABLE</code></a></li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_package.html" target="_top"><code class="classname">PACKAGE</code></a></li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_pathname.html" target="_top"><code class="classname">PATHNAME</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_logical-pathname.html" target="_top"><code class="classname">LOGICAL-PATHNAME</code></a>
- </li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_random-state.html" target="_top"><code class="classname">RANDOM-STATE</code></a></li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_readtable.html" target="_top"><code class="classname">READTABLE</code></a></li><li><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_stream.html" target="_top"><code class="classname">STREAM</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_broadcast-stream.html" target="_top"><code class="classname">BROADCAST-STREAM</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_concatenated-stream.html" target="_top"><code class="classname">CONCATENATED-STREAM</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_echo-stream.html" target="_top"><code class="classname">ECHO-STREAM</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_string-stream.html" target="_top"><code class="classname">STRING-STREAM</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_file-stream.html" target="_top"><code class="classname">FILE-STREAM</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_synonym-stream.html" target="_top"><code class="classname">SYNONYM-STREAM</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_two-way-stream.html" target="_top"><code class="classname">TWO-WAY-STREAM</code></a>
- </li></ul></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="def-class"></a>4.5. Defining Classes
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_4-3-2.html" target="_top">[CLHS-4.3.2]</a></h2></div></div></div><p><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defclass.html" target="_top"><code class="function">DEFCLASS</code></a> supports the <code class="constant">:METACLASS</code> option. Possible values are
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_standard-class.html" target="_top"><code class="classname">STANDARD-CLASS</code></a> (the default), <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_structure-class.html" target="_top"><code class="classname">STRUCTURE-CLASS</code></a> (which creates
- structure classes, like <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defstruct.html" target="_top"><code class="function">DEFSTRUCT</code></a> does), and user-defined
- meta-classes (see <a class="xref" href="#validate-superclass" title="29.3.6.7. Generic Function CLOS:VALIDATE-SUPERCLASS">Section 29.3.6.7, “Generic Function <code class="function">CLOS:VALIDATE-SUPERCLASS</code>”</a>).</p><p>It is <span class="strong"><strong>not</strong></span> required that the superclasses of a class are
- defined before the <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defclass.html" target="_top"><code class="function">DEFCLASS</code></a> form for the class is evaluated.
- Use <a class="link" href="#mop-chap" title="Chapter 29. Meta-Object Protocol">Meta-Object Protocol</a> generic functions <a class="link" href="#class-finalized-p" title="29.3.3.9. Generic Function CLOS:CLASS-FINALIZED-P"><code class="function">CLOS:CLASS-FINALIZED-P</code></a> to check whether the
- class has been finalized and thus its instances can be created,
- and <a class="link" href="#finalize-inheritance" title="29.3.6.4. Generic Function CLOS:FINALIZE-INHERITANCE"><code class="function">CLOS:FINALIZE-INHERITANCE</code></a> to force class finalization.</p><p>See also <a class="xref" href="#mop-cl-defclass" title="29.3.1. Macro DEFCLASS">Section 29.3.1, “Macro <code class="function">DEFCLASS</code>”</a>.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="redef-class"></a>4.6. Redefining Classes
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_4-3-6.html" target="_top">[CLHS-4.3.6]</a></h2></div></div></div><p>Trivial changes, e.g., those that can occur when doubly loading
- the same code, do not require updating the instances.
- These are the changes that do not modify the set of local slots
- accessible in instances, e.g., changes to slot options <code class="constant">:INITFORM</code>,
- <code class="constant">:DOCUMENTATION</code>, and changes to class options
- <code class="constant">:DEFAULT-INITARGS</code>, <code class="constant">:DOCUMENTATION</code>.</p><p>The instances are updated when they are first accessed, <span class="strong"><strong>not</strong></span> at
- the time when the class is redefined or <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/stagenfun_mak_ces-obsolete.html" target="_top"><code class="function">MAKE-INSTANCES-OBSOLETE</code></a> is
- called. When the class has been redefined several times since the
- instance was last accessed, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/stagenfun_upd_efined-class.html" target="_top"><code class="function">UPDATE-INSTANCE-FOR-REDEFINED-CLASS</code></a> is
- still called just once.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="type-class-dict"></a>4.7. The Types and Classes Dictionary
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_the_types_s_dictionary.html" target="_top">[CLHS-4.4]</a></h2></div></div></div><div class="toc"><dl><dt><span class="section"><a href="#fixnum-char-ansi">4.7.1. Function <code class="function">COERCE</code></a></span></dt></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fixnum-char-ansi"></a>4.7.1. Function <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_coerce.html" target="_top"><code class="function">COERCE</code></a></h3></div></div></div><p><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_fixnum.html" target="_top"><code class="classname">FIXNUM</code></a> is not a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/glo_c.html#character_designator" target="_top">character
- designator</a> in [<span class="citation"><a class="link" href="#ansi-cl" title="ANSI Common Lisp standard X3.226-1994 - Information Technology - Programming Language - Common Lisp">ANSI CL standard</a></span>], although <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> provides an
- obvious venue to <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_coerce.html" target="_top"><code class="function">COERCE</code></a> a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_fixnum.html" target="_top"><code class="classname">FIXNUM</code></a> to a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_character.html" target="_top"><code class="classname">CHARACTER</code></a>.
- When <a class="link" href="#fixnum-char-ansi" title="4.7.1. Function COERCE"><code class="varname">CUSTOM:*COERCE-FIXNUM-CHAR-ANSI*</code></a> is <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_nil.html" target="_top"><code class="constant">NIL</code></a>, <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_coerce.html" target="_top"><code class="function">COERCE</code></a>s <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_fixnum.html" target="_top"><code class="classname">FIXNUM</code></a>s to
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_character.html" target="_top"><code class="classname">CHARACTER</code></a>s via <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a>.
- When <a class="link" href="#fixnum-char-ansi" title="4.7.1. Function COERCE"><code class="varname">CUSTOM:*COERCE-FIXNUM-CHAR-ANSI*</code></a> is non-<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_nil.html" target="_top"><code class="constant">NIL</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_fixnum.html" target="_top"><code class="classname">FIXNUM</code></a>s cannot be
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_coerce.html" target="_top"><code class="function">COERCE</code></a>d to <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_character.html" target="_top"><code class="classname">CHARACTER</code></a>s.</p></div></div></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="data"></a>Chapter 5. Data and Control Flow
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/chap-5.html" target="_top">[CLHS-5]</a></h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#flow-dict">5.1. The Data and Control Flow Dictionary
- [CLHS-5.3]</a></span></dt><dd><dl><dt><span class="section"><a href="#defconstant">5.1.1. Macro <code class="function">DEFCONSTANT</code></a></span></dt><dt><span class="section"><a href="#fcase">5.1.2. Macro <code class="function">EXT:FCASE</code></a></span></dt><dt><span class="section"><a href="#xor">5.1.3. Function EXT:XOR</a></span></dt><dt><span class="section"><a href="#eq">5.1.4. Function <code class="function">EQ</code></a></span></dt><dt><span class="section"><a href="#sym-fun">5.1.5. Function <code class="function">SYMBOL-FUNCTION</code></a></span></dt><dt><span class="section"><a href="#setf">5.1.6. Macro <code class="function">SETF</code></a></span></dt><dt><span class="section"><a href="#func">5.1.7. Special Operator <code class="function">FUNCTION</code></a></span></dt><dt><span class="section"><a href="#def-sym-mac">5.1.8. Macro <code class="function">DEFINE-SYMBOL-MACRO</code></a></span></dt><dt><span class="section"><a href="#lambda">5.1.9. Macro <code class="function">LAMBDA</code></a></span></dt><dt><span class="section"><a href="#defun">5.1.10. Macros <code class="function">DEFUN</code> & <code class="function">DEFMACRO</code></a></span></dt></dl></dd></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="flow-dict"></a>5.1. The Data and Control Flow Dictionary
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_the_data__w_dictionary.html" target="_top">[CLHS-5.3]</a></h2></div></div></div><div class="toc"><dl><dt><span class="section"><a href="#defconstant">5.1.1. Macro <code class="function">DEFCONSTANT</code></a></span></dt><dt><span class="section"><a href="#fcase">5.1.2. Macro <code class="function">EXT:FCASE</code></a></span></dt><dt><span class="section"><a href="#xor">5.1.3. Function EXT:XOR</a></span></dt><dt><span class="section"><a href="#eq">5.1.4. Function <code class="function">EQ</code></a></span></dt><dt><span class="section"><a href="#sym-fun">5.1.5. Function <code class="function">SYMBOL-FUNCTION</code></a></span></dt><dt><span class="section"><a href="#setf">5.1.6. Macro <code class="function">SETF</code></a></span></dt><dt><span class="section"><a href="#func">5.1.7. Special Operator <code class="function">FUNCTION</code></a></span></dt><dt><span class="section"><a href="#def-sym-mac">5.1.8. Macro <code class="function">DEFINE-SYMBOL-MACRO</code></a></span></dt><dt><span class="section"><a href="#lambda">5.1.9. Macro <code class="function">LAMBDA</code></a></span></dt><dt><span class="section"><a href="#defun">5.1.10. Macros <code class="function">DEFUN</code> & <code class="function">DEFMACRO</code></a></span></dt></dl></div><p><a id="fle"></a><b>Function <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_function-_a-expression.html" target="_top"><code class="function">FUNCTION-LAMBDA-EXPRESSION</code></a>. </b>The <em class="replaceable"><code>name</code></em> of a <a class="link" href="#dffi" title="32.3. The Foreign Function Call Facility"><code class="classname">FFI:FOREIGN-FUNCTION</code></a> is a <span class="emphasis"><em>string</em></span>
- (the name of the underlying <a class="ulink" href="http://www.eskimo.com/~scs/C-faq/top.html" target="_top"><span class="command"><strong>C</strong></span></a> function), not a lisp <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/glo_f.html#function_name" target="_top">function name</a>.
- </p><p><a id="des-bind"></a><b>Macro <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_destructuring-bind.html" target="_top"><code class="function">DESTRUCTURING-BIND</code></a>. </b>This macro does not perform full error checking.</p><p><a id="macro-special"></a><b>Macros <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_prog1cm_prog2.html" target="_top"><code class="function">PROG1</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_prog1cm_prog2.html" target="_top"><code class="function">PROG2</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_and.html" target="_top"><code class="function">AND</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_or.html" target="_top"><code class="function">OR</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_psetq.html" target="_top"><code class="function">PSETQ</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_whencm_unless.html" target="_top"><code class="function">WHEN</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_whencm_unless.html" target="_top"><code class="function">UNLESS</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_cond.html" target="_top"><code class="function">COND</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_casecm_ccasecm_ecase.html" target="_top"><code class="function">CASE</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_multiple-value-list.html" target="_top"><code class="function">MULTIPLE-VALUE-LIST</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_multiple-value-bind.html" target="_top"><code class="function">MULTIPLE-VALUE-BIND</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_multiple-value-setq.html" target="_top"><code class="function">MULTIPLE-VALUE-SETQ</code></a>. </b>These macros are implemented as special operators (as permitted by
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-1-2-1-2-2.html" target="_top">Section 3.1.2.1.2.2</a>)
- and, as such, are rather efficient.</p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="defconstant"></a>5.1.1. Macro <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defconstant.html" target="_top"><code class="function">DEFCONSTANT</code></a></h3></div></div></div><p>The initial value is <span class="strong"><strong>not</strong></span> evaluated at compile time,
- just like with <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defparametercm_defvar.html" target="_top"><code class="function">DEFVAR</code></a> and <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defparametercm_defvar.html" target="_top"><code class="function">DEFPARAMETER</code></a>.
- Use <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/speope_eval-when.html" target="_top"><code class="function">EVAL-WHEN</code></a> if you need the value at compile time.</p><p>If the variable is already bound to a value which is not <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_eql.html" target="_top"><code class="function">EQL</code></a> to
- the new value, a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_warning.html" target="_top"><code class="classname">WARNING</code></a> is issued.</p><p><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-1-2-1-1-3.html" target="_top">constant variable</a>s may not be bound dynamically or lexically.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fcase"></a>5.1.2. Macro <a class="link" href="#fcase" title="5.1.2. Macro EXT:FCASE"><code class="function">EXT:FCASE</code></a></h3></div></div></div><p>This macro allows specifying the test for <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_casecm_ccasecm_ecase.html" target="_top"><code class="function">CASE</code></a>, e.g.,
- </p><pre class="programlisting">
- (fcase string= (subseq foo 0 (position #\Space foo))
- ("first" 1)
- (("second" "two") 2)
- (("true" "yes") t)
- (otherwise nil))
- </pre><p>
- is the same as
- </p><pre class="programlisting">
- (let ((var (subseq foo 0 (position #\Space foo))))
- (cond ((string= var "first") 1)
- ((or (string= var "second") (string= var "two")) 2)
- ((or (string= var "true") (string= var "yes")) t)
- (t nil)))
- </pre><p>
- If you use a built-in <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_hash-table.html" target="_top"><code class="classname">HASH-TABLE</code></a> test (see <a class="xref" href="#ht-test" title="18.1.3. Function HASH-TABLE-TEST">Section 18.1.3, “Function <code class="function">HASH-TABLE-TEST</code>”</a>)
- as the test (e.g., <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_equal.html" target="_top"><code class="function">EQUAL</code></a> instead of <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_stringeqc_ng-not-lessp.html" target="_top"><code class="function">STRING=</code></a> above, but not a test
- defined using <a class="link" href="#defhash" title="18.1.2. Macro EXT:DEFINE-HASH-TABLE-TEST"><code class="function">EXT:DEFINE-HASH-TABLE-TEST</code></a>), the compiler will be able to optimize the
- <a class="link" href="#fcase" title="5.1.2. Macro EXT:FCASE"><code class="function">EXT:FCASE</code></a> form better than the corresponding <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_cond.html" target="_top"><code class="function">COND</code></a> form.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="xor"></a>5.1.3. Function <code class="function">EXT:XOR</code></h3></div></div></div><p>This function checks that exactly one of its arguments is non-<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_nil.html" target="_top"><code class="constant">NIL</code></a>
- and, if this is the case, returns its value and index in the argument
- list as <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/glo_m.html#multiple_values" target="_top">multiple values</a>, otherwise returns <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_nil.html" target="_top"><code class="constant">NIL</code></a>.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="eq"></a>5.1.4. Function <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_eq.html" target="_top"><code class="function">EQ</code></a></h3></div></div></div><p><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_eq.html" target="_top"><code class="function">EQ</code></a> compares <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_character.html" target="_top"><code class="classname">CHARACTER</code></a>s and <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_fixnum.html" target="_top"><code class="classname">FIXNUM</code></a>s as <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_eql.html" target="_top"><code class="function">EQL</code></a> does.
- No unnecessary copies are made of <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_character.html" target="_top"><code class="classname">CHARACTER</code></a>s and <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_number.html" target="_top"><code class="classname">NUMBER</code></a>s.
- Nevertheless, one should use <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_eql.html" target="_top"><code class="function">EQL</code></a> as it is more portable across <a class="ulink" href="http://www.lisp.org" target="_top"><span class="command"><strong>Common Lisp</strong></span></a>
- implementations.</p><p><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/speope_letcm_letst.html" target="_top"><code class="function">LET</code></a> ((<em class="replaceable"><code>x</code></em> <em class="replaceable"><code>y</code></em>)) (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_eq.html" target="_top"><code class="function">EQ</code></a> <em class="replaceable"><code>x</code></em> <em class="replaceable"><code>x</code></em>))</code> always
- returns <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_t.html" target="_top"><code class="constant">T</code></a>, regardless of <em class="replaceable"><code>y</code></em>.</p><p>See also <a class="xref" href="#dffi-eq" title="Equality of foreign values.">Equality of foreign values.</a>.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="sym-fun"></a>5.1.5. Function <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/acc_symbol-function.html" target="_top"><code class="function">SYMBOL-FUNCTION</code></a></h3></div></div></div><p><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_setfcm_psetf.html" target="_top"><code class="function">SETF</code></a> (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/acc_symbol-function.html" target="_top"><code class="function">SYMBOL-FUNCTION</code></a> <em class="replaceable"><code>symbol</code></em>) <em class="replaceable"><code>object</code></em>)</code>
- requires <em class="replaceable"><code>object</code></em> to be either a function, a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/acc_symbol-function.html" target="_top"><code class="function">SYMBOL-FUNCTION</code></a> return
- value, or a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-1-3.html" target="_top">lambda expression</a>. The <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-1-3.html" target="_top">lambda expression</a> is thereby immediately
- converted to a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_function.html" target="_top"><code class="classname">FUNCTION</code></a>.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="setf"></a>5.1.6. Macro <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_setfcm_psetf.html" target="_top"><code class="function">SETF</code></a></h3></div></div></div><p>Additional <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/glo_p.html#place" target="_top">place</a>s:
- </p><div class="variablelist"><dl><dt><span class="term"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_funcall.html" target="_top"><code class="function">FUNCALL</code></a></span></dt><dd><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_setfcm_psetf.html" target="_top"><code class="function">SETF</code></a> (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_funcall.html" target="_top"><code class="function">FUNCALL</code></a> #'<em class="replaceable"><code>symbol</code></em> ...)
- <em class="replaceable"><code>object</code></em>)</code> and
- <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_setfcm_psetf.html" target="_top"><code class="function">SETF</code></a> (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_funcall.html" target="_top"><code class="function">FUNCALL</code></a> '<em class="replaceable"><code>symbol</code></em> ...) <em class="replaceable"><code>object</code></em>)</code>
- are equivalent to <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_setfcm_psetf.html" target="_top"><code class="function">SETF</code></a> (<em class="replaceable"><code>symbol</code></em> ...) <em class="replaceable"><code>object</code></em>)</code>.
- </dd><dt><span class="term"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/speope_progn.html" target="_top"><code class="function">PROGN</code></a></span></dt><dd><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_setfcm_psetf.html" target="_top"><code class="function">SETF</code></a> (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/speope_progn.html" target="_top"><code class="function">PROGN</code></a> <em class="replaceable"><code>form</code></em> ... <em class="replaceable"><code>place</code></em>)
- <em class="replaceable"><code>object</code></em>)</code></dd><dt><span class="term"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/speope_locally.html" target="_top"><code class="function">LOCALLY</code></a></span></dt><dd><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_setfcm_psetf.html" target="_top"><code class="function">SETF</code></a> (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/speope_locally.html" target="_top"><code class="function">LOCALLY</code></a> <em class="replaceable"><code>declaration</code></em> ...
- <em class="replaceable"><code>form</code></em> ... <em class="replaceable"><code>place</code></em>) <em class="replaceable"><code>object</code></em>)</code>
- </dd><dt><span class="term"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/speope_if.html" target="_top"><code class="function">IF</code></a></span></dt><dd><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_setfcm_psetf.html" target="_top"><code class="function">SETF</code></a> (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/speope_if.html" target="_top"><code class="function">IF</code></a> <em class="replaceable"><code>condition</code></em>
- <em class="replaceable"><code>place<sub>1</sub></code></em>
- <em class="replaceable"><code>place<sub>2</sub></code></em>)
- <em class="replaceable"><code>object</code></em>)</code></dd><dt><span class="term"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_set-dispa_ro-character.html" target="_top"><code class="function">GET-DISPATCH-MACRO-CHARACTER</code></a></span></dt><dd><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_setfcm_psetf.html" target="_top"><code class="function">SETF</code></a> (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_set-dispa_ro-character.html" target="_top"><code class="function">GET-DISPATCH-MACRO-CHARACTER</code></a> ...)
- ...)</code> calls <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_set-dispa_ro-character.html" target="_top"><code class="function">SET-DISPATCH-MACRO-CHARACTER</code></a>.
- </dd><dt><span class="term"><a class="link" href="#lfd" title="Arbitrary Precision Floats"><code class="function">EXT:LONG-FLOAT-DIGITS</code></a>:</span></dt><dd><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_setfcm_psetf.html" target="_top"><code class="function">SETF</code></a> (<a class="link" href="#lfd" title="Arbitrary Precision Floats"><code class="function">EXT:LONG-FLOAT-DIGITS</code></a>) <em class="replaceable"><code>digits</code></em>)</code> sets the
- default mantissa length of <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_short-flo_m_long-float.html" target="_top"><code class="classname">LONG-FLOAT</code></a>s to <em class="replaceable"><code>digits</code></em> bits.
- </dd><dt><span class="term"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_values-list.html" target="_top"><code class="function">VALUES-LIST</code></a></span></dt><dd><p><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_setfcm_psetf.html" target="_top"><code class="function">SETF</code></a> (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_values-list.html" target="_top"><code class="function">VALUES-LIST</code></a> <em class="replaceable"><code>list</code></em>) <em class="replaceable"><code>form</code></em>)</code>
- is equivalent to <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_values-list.html" target="_top"><code class="function">VALUES-LIST</code></a> (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_setfcm_psetf.html" target="_top"><code class="function">SETF</code></a> <em class="replaceable"><code>list</code></em>
- (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_multiple-value-list.html" target="_top"><code class="function">MULTIPLE-VALUE-LIST</code></a> <em class="replaceable"><code>form</code></em>)))</code>.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>Note that this <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/glo_p.html#place" target="_top">place</a> is restricted: it can only be
- used in <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_setfcm_psetf.html" target="_top"><code class="function">SETF</code></a>, <a class="link" href="#letf" title="31.11.2. Macros EXT:LETF & EXT:LETF*"><code class="function">EXT:LETF</code></a>, <a class="link" href="#letf" title="31.11.2. Macros EXT:LETF & EXT:LETF*"><code class="function">EXT:LETF*</code></a>, not in other positions.
- </p></div></dd></dl></div><p><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html" target="_top"><code class="literal">&KEY</code></a> markers in <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defsetf.html" target="_top"><code class="function">DEFSETF</code></a> <a class="link" href="#lalist" title="3.4. Lambda Lists [CLHS-3.4]">lambda list</a>s are supported, but the
- corresponding keywords must appear literally in the program text.</p><p><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_get-setf-expansion.html" target="_top"><code class="function">GET-SETF-EXPANSION</code></a> <em class="replaceable"><code>form</code></em> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html" target="_top"><code class="literal">&OPTIONAL</code></a> <em class="replaceable"><code><a class="ulink" href="http://www.lisp.org/HyperSpec/sec_3-1-1-4.html" target="_top">environment</a></code></em>)</code>,
- <code class="code">(EXT:GET-SETF-METHOD <em class="replaceable"><code>form</code></em> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html" target="_top"><code class="literal">&OPTIONAL</code></a> <em class="replaceable"><code><a class="ulink" href="http://www.lisp.org/HyperSpec/sec_3-1-1-4.html" target="_top">environment</a></code></em>)</code>, and
- <code class="code">(EXT:GET-SETF-METHOD-MULTIPLE-VALUE <em class="replaceable"><code>form</code></em> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html" target="_top"><code class="literal">&OPTIONAL</code></a>
- <em class="replaceable"><code><a class="ulink" href="http://www.lisp.org/HyperSpec/sec_3-1-1-4.html" target="_top">environment</a></code></em>)</code> receive as optional argument <em class="replaceable"><code><a class="ulink" href="http://www.lisp.org/HyperSpec/sec_3-1-1-4.html" target="_top">environment</a></code></em> the environment
- necessary for macro expansions. In <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_define-setf-expander.html" target="_top"><code class="function">DEFINE-SETF-EXPANDER</code></a>
- and <code class="function">EXT:DEFINE-SETF-METHOD</code> <a class="link" href="#lalist" title="3.4. Lambda Lists [CLHS-3.4]">lambda list</a>s, one can
- specify <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-4-4.html" target="_top"><code class="literal">&ENVIRONMENT</code></a> and a variable, which will be bound to the
- environment. This environment should be passed to all calls of
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_get-setf-expansion.html" target="_top"><code class="function">GET-SETF-EXPANSION</code></a>, <code class="function">EXT:GET-SETF-METHOD</code> and
- <code class="function">EXT:GET-SETF-METHOD-MULTIPLE-VALUE</code>. If this is
- done, even local macros will be interpreted as places correctly.</p><p>An attempt to modify read-only data <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_signal.html" target="_top"><code class="function">SIGNAL</code></a>s an <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_error.html" target="_top"><code class="classname">ERROR</code></a>.
- Program text and quoted constants loaded from files are considered
- read-only data. This check is only performed for strings, not for
- conses, other kinds of arrays, and user-defined data types.</p><p>See also <a class="xref" href="#letf" title="31.11.2. Macros EXT:LETF & EXT:LETF*">Section 31.11.2, “Macros <code class="function">EXT:LETF</code> & <code class="function">EXT:LETF*</code>”</a>.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="func"></a>5.1.7. Special Operator <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/speope_function.html" target="_top"><code class="function">FUNCTION</code></a></h3></div></div></div><p><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/speope_function.html" target="_top"><code class="function">FUNCTION</code></a> <em class="replaceable"><code>symbol</code></em>)</code> returns the local function
- definition established by <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/speope_fletcm_scm_macrolet.html" target="_top"><code class="function">FLET</code></a> or <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/speope_fletcm_scm_macrolet.html" target="_top"><code class="function">LABELS</code></a>, if it exists, otherwise
- the global function definition.</p><p><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_special-operator-p.html" target="_top"><code class="function">SPECIAL-OPERATOR-P</code></a> <em class="replaceable"><code>symbol</code></em>)</code> returns <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_nil.html" target="_top"><code class="constant">NIL</code></a> or
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_t.html" target="_top"><code class="constant">T</code></a>. If it returns <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_t.html" target="_top"><code class="constant">T</code></a>, then <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/acc_symbol-function.html" target="_top"><code class="function">SYMBOL-FUNCTION</code></a>
- <em class="replaceable"><code>symbol</code></em>)</code> returns the (useless) special operator handler.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="def-sym-mac"></a>5.1.8. Macro <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_define-symbol-macro.html" target="_top"><code class="function">DEFINE-SYMBOL-MACRO</code></a></h3></div></div></div><p>The macro <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_define-symbol-macro.html" target="_top"><code class="function">DEFINE-SYMBOL-MACRO</code></a> establishes <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_define-symbol-macro.html" target="_top"><code class="classname">SYMBOL-MACRO</code></a>s with
- global scope (as opposed to <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_define-symbol-macro.html" target="_top"><code class="classname">SYMBOL-MACRO</code></a>s defined with
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/speope_symbol-macrolet.html" target="_top"><code class="function">SYMBOL-MACROLET</code></a>, which have local scope).</p><p>The function
- <strong class="first"><em class="firstterm"><a class="link" href="#symbol-mex"><code class="function">EXT:SYMBOL-MACRO-EXPAND</code></a><a id="symbol-mex" class="indexterm"></a></em></strong>
- tests for a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_define-symbol-macro.html" target="_top"><code class="classname">SYMBOL-MACRO</code></a>: If <em class="replaceable"><code>symbol</code></em> is defined as a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_define-symbol-macro.html" target="_top"><code class="classname">SYMBOL-MACRO</code></a>
- in the <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-1-1-1.html" target="_top">global environment</a>, <code class="code">(<a class="link" href="#symbol-mex"><code class="function">EXT:SYMBOL-MACRO-EXPAND</code></a> <em class="replaceable"><code>symbol</code></em>)</code> returns two
- values, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_t.html" target="_top"><code class="constant">T</code></a> and the expansion; otherwise it returns <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_nil.html" target="_top"><code class="constant">NIL</code></a>.</p><p><a class="link" href="#symbol-mex"><code class="function">EXT:SYMBOL-MACRO-EXPAND</code></a> is a special case of <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_macroexpa_acroexpand-1.html" target="_top"><code class="function">MACROEXPAND-1</code></a>. <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_macroexpa_acroexpand-1.html" target="_top"><code class="function">MACROEXPAND-1</code></a>
- can also test whether a symbol is defined as a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_define-symbol-macro.html" target="_top"><code class="classname">SYMBOL-MACRO</code></a> in <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-1-1-3.html" target="_top">lexical environment</a>s
- other than the <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-1-1-1.html" target="_top">global environment</a>.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="lambda"></a>5.1.9. Macro <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_lambda.html" target="_top"><code class="function">LAMBDA</code></a></h3></div></div></div><p><b>Constant <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_lambda_ist-keywords.html" target="_top"><code class="constant">LAMBDA-LIST-KEYWORDS</code></a>. </b><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html" target="_top"><code class="literal">&OPTIONAL</code></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html" target="_top"><code class="literal">&REST</code></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html" target="_top"><code class="literal">&KEY</code></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html" target="_top"><code class="literal">&ALLOW-OTHER-KEYS</code></a>
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html" target="_top"><code class="literal">&AUX</code></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-4-4.html" target="_top"><code class="literal">&BODY</code></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-4-4.html" target="_top"><code class="literal">&WHOLE</code></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-4-4.html" target="_top"><code class="literal">&ENVIRONMENT</code></a>)</code></p><div class="table"><a id="values-limits-table"></a><p class="title"><b>Table 5.1. Function call limits</b></p><div class="table-contents"><table summary="Function call limits" border="1"><colgroup><col /><col /></colgroup><tbody><tr><td align="center"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_call-a_uments-limit.html" target="_top"><code class="constant">CALL-ARGUMENTS-LIMIT</code></a></td><td align="center">2<sup>12</sup>=4096</td></tr><tr><td align="center"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_multip_values-limit.html" target="_top"><code class="constant">MULTIPLE-VALUES-LIMIT</code></a></td><td align="center">2<sup>7</sup>=128</td></tr><tr><td align="center"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_lambda_meters-limit.html" target="_top"><code class="constant">LAMBDA-PARAMETERS-LIMIT</code></a></td><td align="center">2<sup>12</sup>=4096</td></tr></tbody></table></div></div><br class="table-break" /></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="defun"></a>5.1.10. Macros <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defun.html" target="_top"><code class="function">DEFUN</code></a> & <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defmacro.html" target="_top"><code class="function">DEFMACRO</code></a></h3></div></div></div><p><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defun.html" target="_top"><code class="function">DEFUN</code></a> and <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defmacro.html" target="_top"><code class="function">DEFMACRO</code></a> are allowed in non-toplevel positions. As
- an example, consider the old (<a class="xref" href="#CLtL1" title="Common Lisp: the Language (1st Edition)">[<abbr class="abbrev">CLtL1</abbr>]</a>) definition of <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_gensym.html" target="_top"><code class="function">GENSYM</code></a>:</p><pre class="programlisting">
- (let ((gensym-prefix "G")
- (gensym-count 1))
- (defun gensym (&optional (x nil s))
- (when s
- (cond ((stringp x) (setq gensym-prefix x))
- ((integerp x)
- (if (minusp x)
- (error "~S: index ~S is negative" 'gensym x)
- (setq gensym-count x)))
- (t (error "~S: argument ~S of wrong type" 'gensym x))))
- (prog1
- (make-symbol
- (concatenate 'string
- gensym-prefix
- (write-to-string gensym-count :base 10 :radix nil)))
- (incf gensym-count))))
- </pre><p>See also <a class="xref" href="#minimal-compilation" title="3.2.2.2. Minimal Compilation [CLHS-3.2.2.2]">Section 3.2.2.2, “Minimal Compilation
- [CLHS-3.2.2.2]”</a>.</p><p><a id="arglist"></a><b>Function <a class="link" href="#arglist" title="Function EXT:ARGLIST"><code class="function">EXT:ARGLIST</code></a>. </b>Function <code class="code">(<a class="link" href="#arglist" title="Function EXT:ARGLIST"><code class="function">EXT:ARGLIST</code></a> <em class="replaceable"><code>name</code></em>)</code> returns the <a class="link" href="#lalist" title="3.4. Lambda Lists [CLHS-3.4]">lambda list</a> of
- the function or macro that <em class="replaceable"><code>name</code></em> names and <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_signal.html" target="_top"><code class="function">SIGNAL</code></a>s an <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_error.html" target="_top"><code class="classname">ERROR</code></a> if <em class="replaceable"><code>name</code></em> is
- not <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_fboundp.html" target="_top"><code class="function">FBOUNDP</code></a>. It also <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_signal.html" target="_top"><code class="function">SIGNAL</code></a>s an <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_error.html" target="_top"><code class="classname">ERROR</code></a> when the macro <a class="link" href="#lalist" title="3.4. Lambda Lists [CLHS-3.4]">lambda list</a> is not
- available due to the compiler optimization settings
- (see <a class="xref" href="#space-decl" title="3.3.4. Declaration SPACE">Section 3.3.4, “Declaration <code class="literal">SPACE</code>”</a>).</p><p><a id="suppress-check-redef"></a><b>Variable <a class="link" href="#suppress-check-redef" title="Variable CUSTOM:*SUPPRESS-CHECK-REDEFINITION*"><code class="varname">CUSTOM:*SUPPRESS-CHECK-REDEFINITION*</code></a>. </b>When <strong class="first"><em class="firstterm"><a class="link" href="#suppress-check-redef" title="Variable CUSTOM:*SUPPRESS-CHECK-REDEFINITION*"><code class="varname">CUSTOM:*SUPPRESS-CHECK-REDEFINITION*</code></a></em></strong> is <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_nil.html" target="_top"><code class="constant">NIL</code></a>,
- <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> issues a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_warning.html" target="_top"><code class="classname">WARNING</code></a> when a function (macro, variable, class,
- etc) is redefined in a different file than its original definition.
- It is <span class="strong"><strong>not</strong></span> a good idea to set this variable to <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_t.html" target="_top"><code class="constant">T</code></a>.
- </p><p><a id="defun-accept-spelalist"></a><b>Variable <a class="link" href="#defun-accept-spelalist" title="Variable CUSTOM:*DEFUN-ACCEPT-SPECIALIZED-LAMBDA-LIST*"><code class="varname">CUSTOM:*DEFUN-ACCEPT-SPECIALIZED-LAMBDA-LIST*</code></a>. </b>When <strong class="first"><em class="firstterm"><a class="link" href="#defun-accept-spelalist" title="Variable CUSTOM:*DEFUN-ACCEPT-SPECIALIZED-LAMBDA-LIST*"><code class="varname">CUSTOM:*DEFUN-ACCEPT-SPECIALIZED-LAMBDA-LIST*</code></a></em></strong> is
- non-<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_nil.html" target="_top"><code class="constant">NIL</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defun.html" target="_top"><code class="function">DEFUN</code></a> accepts <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-4-3.html" target="_top">specialized lambda list</a>s, converting type-parameter
- associations to type declarations:
- </p><pre class="programlisting">(defun f ((x list) (y integer)) ...)</pre><p>
- is equivalent to
- </p><pre class="programlisting">(defun f (x y) (declare (type list x) (type integer y)) ...)</pre><p>
- This extension is disabled by <code class="option"><a href="clisp.html#opt-ansi" class="olink">-ansi</a></code> and by setting <a href="impnotes.html#ansi" class="olink"><code class="varname">CUSTOM:*ANSI*</code></a> to <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_t.html" target="_top"><code class="constant">T</code></a>,
- but can be re-enabled by setting <a class="link" href="#defun-accept-spelalist" title="Variable CUSTOM:*DEFUN-ACCEPT-SPECIALIZED-LAMBDA-LIST*"><code class="varname">CUSTOM:*DEFUN-ACCEPT-SPECIALIZED-LAMBDA-LIST*</code></a> explicitly.
- </p></div></div></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="iteration"></a>Chapter 6. Iteration
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/chap-6.html" target="_top">[CLHS-6]</a></h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#loop">6.1. The LOOP Facility
- [CLHS-6.1]</a></span></dt><dd><dl><dt><span class="section"><a href="#loop-inter-var-finally">6.1.1. Iteration variables in the loop epilogue</a></span></dt><dt><span class="section"><a href="#loop-ansi">6.1.2. Backward Compatibility</a></span></dt></dl></dd><dt><span class="section"><a href="#iter-dict">6.2. The Iteration Dictionary
- [CLHS-6.2]</a></span></dt></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="loop"></a>6.1. The LOOP Facility
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_6-1.html" target="_top">[CLHS-6.1]</a></h2></div></div></div><div class="toc"><dl><dt><span class="section"><a href="#loop-inter-var-finally">6.1.1. Iteration variables in the loop epilogue</a></span></dt><dt><span class="section"><a href="#loop-ansi">6.1.2. Backward Compatibility</a></span></dt></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="loop-inter-var-finally"></a>6.1.1. Iteration variables in the loop epilogue</h3></div></div></div><p>The standard is unambiguous in that the iteration variables do
- still exist in the <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_6-1-7-2.html" target="_top"><code class="literal">FINALLY</code></a> clause, but <span class="strong"><strong>not</strong></span> as to what values
- these variables might have.
- Therefore the code which relies on the values of such variables, e.g.,
- </p><pre class="programlisting">(loop for x on y finally (return x))</pre><p>
- is inherently non-portable across <a class="ulink" href="http://www.lisp.org" target="_top"><span class="command"><strong>Common Lisp</strong></span></a> implementations,
- and should be avoided.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="loop-ansi"></a>6.1.2. Backward Compatibility</h3></div></div></div><p>There have been some tightening in the <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_loop.html" target="_top"><code class="function">LOOP</code></a> syntax between
- <a class="xref" href="#CLtL2" title="Common Lisp: the Language (2nd Edition)">[<abbr class="abbrev">CLtL2</abbr>]</a> and [<span class="citation"><a class="link" href="#ansi-cl" title="ANSI Common Lisp standard X3.226-1994 - Information Technology - Programming Language - Common Lisp">ANSI CL standard</a></span>], e.g., the following form is legal in the
- former but not the latter:</p><pre class="programlisting">
- (loop initially for i from 1 to 5 do (print i) finally return i)
- </pre><p>
- When <strong class="first"><em class="firstterm"><a class="link" href="#loop-ansi" title="6.1.2. Backward Compatibility"><code class="varname">CUSTOM:*LOOP-ANSI*</code></a></em></strong> is <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_nil.html" target="_top"><code class="constant">NIL</code></a>, such forms are still
- accepted in <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> but elicit a warning at macro-expansion time.
- When <a class="link" href="#loop-ansi" title="6.1.2. Backward Compatibility"><code class="varname">CUSTOM:*LOOP-ANSI*</code></a> is non-<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_nil.html" target="_top"><code class="constant">NIL</code></a>, an <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_error.html" target="_top"><code class="classname">ERROR</code></a> is <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_signal.html" target="_top"><code class="function">SIGNAL</code></a>ed.</p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="iter-dict"></a>6.2. The Iteration Dictionary
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_6-2.html" target="_top">[CLHS-6.2]</a></h2></div></div></div><p>The macros <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_dolist.html" target="_top"><code class="function">DOLIST</code></a> and <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_dotimes.html" target="_top"><code class="function">DOTIMES</code></a> establish a single binding for
- the iteration variable and assign it on each iteration.</p></div></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="objects"></a>Chapter 7. Objects
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/chap-7.html" target="_top">[CLHS-7]</a></h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#std-meth-combo">7.1. Standard Method Combination
- [CLHS-7.6.6.2]</a></span></dt></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="std-meth-combo"></a>7.1. Standard Method Combination
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_7-6-6-2.html" target="_top">[CLHS-7.6.6.2]</a></h2></div></div></div><p>Generic function
- <strong class="first"><em class="firstterm"><a class="link" href="#no-prim"><code class="function">CLOS:NO-PRIMARY-METHOD</code></a><a id="no-prim" class="indexterm"></a></em></strong>
- (similar to <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/stagenfun_no-_cable-method.html" target="_top"><code class="function">NO-APPLICABLE-METHOD</code></a>) is called when there is an
- applicable method but no applicable <span class="emphasis"><em>primary</em></span>
- method.</p><p>The default methods for <a class="link" href="#no-prim"><code class="function">CLOS:NO-PRIMARY-METHOD</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/stagenfun_no-_cable-method.html" target="_top"><code class="function">NO-APPLICABLE-METHOD</code></a> and
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/stagenfun_no-next-method.html" target="_top"><code class="function">NO-NEXT-METHOD</code></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_signal.html" target="_top"><code class="function">SIGNAL</code></a> an <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_error.html" target="_top"><code class="classname">ERROR</code></a> of type
- <strong class="first"><em class="firstterm"><a class="link" href="#meth-call-err"><code class="classname">CLOS:METHOD-CALL-ERROR</code></a>
- <a id="meth-call-err" class="indexterm"></a></em></strong>.
- You can find out more information about the error using functions
- <code class="function">CLOS:METHOD-CALL-ERROR-GENERIC-FUNCTION</code>,
- <code class="function">CLOS:METHOD-CALL-ERROR-ARGUMENT-LIST</code>, and
- (only for <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/stagenfun_no-next-method.html" target="_top"><code class="function">NO-NEXT-METHOD</code></a>)
- <code class="function">CLOS:METHOD-CALL-ERROR-METHOD</code>.
- Moreover, when the generic function has only one <span class="emphasis"><em>dispatching
- argument</em></span>, (i.e., such an argument that not all the
- corresponding parameter specializers are <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_t.html" target="_top"><code class="classname">T</code></a>), an <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_error.html" target="_top"><code class="classname">ERROR</code></a> of type
- <strong class="first"><em class="firstterm"><a class="link" href="#meth-call-type-err"><code class="classname">CLOS:METHOD-CALL-TYPE-ERROR</code></a>
- <a id="meth-call-type-err" class="indexterm"></a></em></strong>
- is <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_signal.html" target="_top"><code class="function">SIGNAL</code></a>ed, additionally making <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_type-erro_xpected-type.html" target="_top"><code class="function">TYPE-ERROR-DATUM</code></a> and
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_type-erro_xpected-type.html" target="_top"><code class="function">TYPE-ERROR-EXPECTED-TYPE</code></a> available.</p></div>
- <!--<section id="obj-dict"><title>The Objects Dictionary <ulink url="&clhs;/Body/sec_7-7.html">[CLHS-7.7]</ulink></title> </section>-->
- </div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="structures"></a>Chapter 8. Structures
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/chap-8.html" target="_top">[CLHS-8]</a></h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#defstruct-options">8.1. The options for <code class="function">DEFSTRUCT</code>.</a></span></dt><dd><dl><dt><span class="section"><a href="#defstruct-print-function">8.1.1. The :PRINT-FUNCTION
- option.</a></span></dt><dt><span class="section"><a href="#defstruct-inherit">8.1.2. The :INHERIT option</a></span></dt></dl></dd><dt><span class="section"><a href="#defstruct-mop">8.2. The structure Meta-Object Protocol.</a></span></dt></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="defstruct-options"></a>8.1. The options for <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defstruct.html" target="_top"><code class="function">DEFSTRUCT</code></a>.</h2></div></div></div><div class="toc"><dl><dt><span class="section"><a href="#defstruct-print-function">8.1.1. The :PRINT-FUNCTION
- option.</a></span></dt><dt><span class="section"><a href="#defstruct-inherit">8.1.2. The :INHERIT option</a></span></dt></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="defstruct-print-function"></a>8.1.1. The <code class="constant">:PRINT-FUNCTION</code>
- option.</h3></div></div></div><p>The <code class="constant">:PRINT-FUNCTION</code> option should contain a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-1-3.html" target="_top">lambda expression</a>
- <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_lambda.html" target="_top"><code class="function">LAMBDA</code></a> (object stream depth) (declare (ignore depth)) ...)</code>
- This <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-1-3.html" target="_top">lambda expression</a> names a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_function.html" target="_top"><code class="classname">FUNCTION</code></a> whose task is to output the
- external representation of the <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/cla_structure-object.html" target="_top"><code class="classname">STRUCTURE-OBJECT</code></a> <em class="replaceable"><code>object</code></em> onto the
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_stream.html" target="_top"><code class="classname">STREAM</code></a> <em class="replaceable"><code>stream</code></em>. This may be done by outputting text onto the
- stream using <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_write-char.html" target="_top"><code class="function">WRITE-CHAR</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_write-str_m_write-line.html" target="_top"><code class="function">WRITE-STRING</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_writecm_p_rintcm_princ.html" target="_top"><code class="function">WRITE</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_writecm_p_rintcm_princ.html" target="_top"><code class="function">PRIN1</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_writecm_p_rintcm_princ.html" target="_top"><code class="function">PRINC</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_writecm_p_rintcm_princ.html" target="_top"><code class="function">PRINT</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_writecm_p_rintcm_princ.html" target="_top"><code class="function">PPRINT</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_format.html" target="_top"><code class="function">FORMAT</code></a> and the like.
- The following rules must be obeyed:</p><div class="itemizedlist"><ul type="disc"><li>The value of <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/var_stprint-escapest.html" target="_top"><code class="varname">*PRINT-ESCAPE*</code></a> must be
- respected.</li><li>The treatment of <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/var_stprint-prettyst.html" target="_top"><code class="varname">*PRINT-PRETTY*</code></a> is up to you.
- </li><li>The value of <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/var_stprint-circlest.html" target="_top"><code class="varname">*PRINT-CIRCLE*</code></a> need not be
- respected. This is managed by the system. (But the print-circle
- mechanism handles only those objects that are direct or indirect
- components of the structure.)</li><li>The value of <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/var_stprint-l_int-lengthst.html" target="_top"><code class="varname">*PRINT-LEVEL*</code></a> is respected by
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_writecm_p_rintcm_princ.html" target="_top"><code class="function">WRITE</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_writecm_p_rintcm_princ.html" target="_top"><code class="function">PRIN1</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_writecm_p_rintcm_princ.html" target="_top"><code class="function">PRINC</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_writecm_p_rintcm_princ.html" target="_top"><code class="function">PRINT</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_writecm_p_rintcm_princ.html" target="_top"><code class="function">PPRINT</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_format.html" target="_top"><code class="function">FORMAT</code></a> instructions
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_22-3-4-1.html" target="_top"><code class="literal">~A</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_22-3-4-2.html" target="_top"><code class="literal">~S</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_22-3-4-3.html" target="_top"><code class="literal">~W</code></a>, and <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_format.html" target="_top"><code class="function">FORMAT</code></a> instructions
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_22-3-2-1.html" target="_top"><code class="literal">~R</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_22-3-2-2.html" target="_top"><code class="literal">~D</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_22-3-2-3.html" target="_top"><code class="literal">~B</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_22-3-2-4.html" target="_top"><code class="literal">~O</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_22-3-2-5.html" target="_top"><code class="literal">~X</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_22-3-3-1.html" target="_top"><code class="literal">~F</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_22-3-3-2.html" target="_top"><code class="literal">~E</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_22-3-3-3.html" target="_top"><code class="literal">~G</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_22-3-3-4.html" target="_top"><code class="literal">~$</code></a> with not-numerical arguments.
- Therefore the print-level mechanism works automatically if only these
- functions are used for outputting objects and if they are not called
- on objects with nesting level > 1. (The print-level mechanism does
- not recognize how many parentheses you have output. It only counts how
- many times it was called recursively.)</li><li>The value of <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/var_stprint-l_int-lengthst.html" target="_top"><code class="varname">*PRINT-LENGTH*</code></a> must be respected,
- especially if you are outputting an arbitrary number of components.
- </li><li>The value of <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/var_stprint-readablyst.html" target="_top"><code class="varname">*PRINT-READABLY*</code></a> must be
- respected. Remember that the values of <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/var_stprint-escapest.html" target="_top"><code class="varname">*PRINT-ESCAPE*</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/var_stprint-l_int-lengthst.html" target="_top"><code class="varname">*PRINT-LEVEL*</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/var_stprint-l_int-lengthst.html" target="_top"><code class="varname">*PRINT-LENGTH*</code></a> are ignored if
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/var_stprint-readablyst.html" target="_top"><code class="varname">*PRINT-READABLY*</code></a> is true. The value of <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/var_stprint-readablyst.html" target="_top"><code class="varname">*PRINT-READABLY*</code></a> is
- respected by <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_print-unr_dable-object.html" target="_top"><code class="function">PRINT-UNREADABLE-OBJECT</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_writecm_p_rintcm_princ.html" target="_top"><code class="function">WRITE</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_writecm_p_rintcm_princ.html" target="_top"><code class="function">PRIN1</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_writecm_p_rintcm_princ.html" target="_top"><code class="function">PRINC</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_writecm_p_rintcm_princ.html" target="_top"><code class="function">PRINT</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_writecm_p_rintcm_princ.html" target="_top"><code class="function">PPRINT</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_format.html" target="_top"><code class="function">FORMAT</code></a> instructions <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_22-3-4-1.html" target="_top"><code class="literal">~A</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_22-3-4-2.html" target="_top"><code class="literal">~S</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_22-3-4-3.html" target="_top"><code class="literal">~W</code></a>, and <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_format.html" target="_top"><code class="function">FORMAT</code></a> instructions <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_22-3-2-1.html" target="_top"><code class="literal">~R</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_22-3-2-2.html" target="_top"><code class="literal">~D</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_22-3-2-3.html" target="_top"><code class="literal">~B</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_22-3-2-4.html" target="_top"><code class="literal">~O</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_22-3-2-5.html" target="_top"><code class="literal">~X</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_22-3-3-1.html" target="_top"><code class="literal">~F</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_22-3-3-2.html" target="_top"><code class="literal">~E</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_22-3-3-3.html" target="_top"><code class="literal">~G</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_22-3-3-4.html" target="_top"><code class="literal">~$</code></a> with not-numerical arguments. Therefore
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/var_stprint-readablyst.html" target="_top"><code class="varname">*PRINT-READABLY*</code></a> will be respected automatically if only these
- functions are used for printing objects.</li><li>You need not worry about the values of
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/var_stprint-b_rint-radixst.html" target="_top"><code class="varname">*PRINT-BASE*</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/var_stprint-b_rint-radixst.html" target="_top"><code class="varname">*PRINT-RADIX*</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/var_stprint-casest.html" target="_top"><code class="varname">*PRINT-CASE*</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/var_stprint-gensymst.html" target="_top"><code class="varname">*PRINT-GENSYM*</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/var_stprint-arrayst.html" target="_top"><code class="varname">*PRINT-ARRAY*</code></a>, <a class="link" href="#pr-closure" title="Variable CUSTOM:*PRINT-CLOSURE*"><code class="varname">CUSTOM:*PRINT-CLOSURE*</code></a>,
- <a class="link" href="#pr-rpars" title="Variable CUSTOM:*PRINT-RPARS*"><code class="varname">CUSTOM:*PRINT-RPARS*</code></a>, <a class="link" href="#pr-indent" title="Variable CUSTOM:*PRINT-INDENT-LISTS*"><code class="varname">CUSTOM:*PRINT-INDENT-LISTS*</code></a>.</li></ul></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="defstruct-inherit"></a>8.1.2. The <code class="constant">:INHERIT</code> option</h3></div></div></div><p>The <code class="constant">:INHERIT</code> option is exactly like <code class="constant">:INCLUDE</code> except that it
- does not create new accessors for the inherited slots (this is a
- <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> extension).</p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="defstruct-mop"></a>8.2. The structure <a class="link" href="#mop-chap" title="Chapter 29. Meta-Object Protocol">Meta-Object Protocol</a>.</h2></div></div></div><p>The following functions accept a structure <em class="replaceable"><code>name</code></em> as the only argument.
- If <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defstruct.html" target="_top"><code class="function">DEFSTRUCT</code></a> was given the <code class="constant">:TYPE</code> option (i.e., <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defstruct.html" target="_top"><code class="function">DEFSTRUCT</code></a> did
- <span class="strong"><strong>not</strong></span> define a new type), then <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/acc_find-class.html" target="_top"><code class="function">FIND-CLASS</code></a> <em class="replaceable"><code>name</code></em>)</code>
- fails (and the regular <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/chap-7.html" target="_top"><span class="command"><strong>CLOS</strong></span></a> <a class="link" href="#mop-chap" title="Chapter 29. Meta-Object Protocol">Meta-Object Protocol</a> is not applicable), but these
- functions still work.</p><div class="variablelist"><dl><dt><span class="term"><code class="function">EXT:STRUCTURE-SLOTS</code></span></dt><dd>Return the <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_list.html" target="_top"><code class="classname">LIST</code></a> of <a class="link" href="#mop-esd-mo">effective</a> <a class="link" href="#mop-slot-def-mo">slot definition metaobject</a>s.
- </dd><dt><span class="term"><code class="function">EXT:STRUCTURE-DIRECT-SLOTS</code></span></dt><dd>Return the <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_list.html" target="_top"><code class="classname">LIST</code></a> of <a class="link" href="#mop-dsd-mo">direct</a> <a class="link" href="#mop-slot-def-mo">slot definition metaobject</a>s.
- </dd><dt><span class="term"><code class="function">EXT:STRUCTURE-KEYWORD-CONSTRUCTOR</code></span></dt><dd>Return the name (a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_symbol.html" target="_top"><code class="classname">SYMBOL</code></a>) of the keyword
- constructor function for the structure, or <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_nil.html" target="_top"><code class="constant">NIL</code></a> if the structure has
- no keyword constructor.</dd><dt><span class="term"><code class="function">EXT:STRUCTURE-BOA-CONSTRUCTORS</code></span></dt><dd>Return the <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_list.html" target="_top"><code class="classname">LIST</code></a> of names (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_symbol.html" target="_top"><code class="classname">SYMBOL</code></a>s)
- of BOA constructors for the structure.</dd><dt><span class="term"><code class="function">EXT:STRUCTURE-COPIER</code></span></dt><dd>Return the name (a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_symbol.html" target="_top"><code class="classname">SYMBOL</code></a>) of the copier for the
- structure.</dd><dt><span class="term"><code class="function">EXT:STRUCTURE-PREDICATE</code></span></dt><dd>Return the name (a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_symbol.html" target="_top"><code class="classname">SYMBOL</code></a>) of the predicate for
- the structure.</dd></dl></div></div></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="conditions"></a>Chapter 9. Conditions
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/chap-9.html" target="_top">[CLHS-9]</a></h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#cond-nl">9.1. Embedded Newlines in Condition Reports
- [CLHS-9.1.3.1.3]</a></span></dt><dt><span class="section"><a href="#cond-dict">9.2. The Conditions Dictionary
- [CLHS-9.2]</a></span></dt></dl></div><p>When an error occurred, you are in a break loop. You can evaluate
- forms as usual. The <span class="command"><strong>help</strong></span> command (or help key if
- there is one) lists the available <a class="link" href="#debugger" title="25.1. Debugging Utilities [CLHS-25.1.2]">debugging
- commands</a>.</p><p><a id="muffle-cerrors"></a><b>Macro <a class="link" href="#muffle-cerrors" title="Macro EXT:MUFFLE-CERRORS"><code class="function">EXT:MUFFLE-CERRORS</code></a>. </b>The macro <code class="code">(<a class="link" href="#muffle-cerrors" title="Macro EXT:MUFFLE-CERRORS"><code class="function">EXT:MUFFLE-CERRORS</code></a> {<em class="replaceable"><code>form</code></em>}*)</code>
- executes the <em class="replaceable"><code>form</code></em>s; when a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/glo_c.html#continuable" target="_top">continuable</a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_error.html" target="_top"><code class="classname">ERROR</code></a> occurs whose <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_abortcm_c_cm_use-value.html" target="_top"><code class="function">CONTINUE</code></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_restart.html" target="_top"><code class="classname">RESTART</code></a>
- can be invoked non-interactively (this includes all <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/glo_c.html#continuable" target="_top">continuable</a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_error.html" target="_top"><code class="classname">ERROR</code></a>s signaled
- by the function <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_cerror.html" target="_top"><code class="function">CERROR</code></a>), no message is printed, instead, the <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_abortcm_c_cm_use-value.html" target="_top"><code class="function">CONTINUE</code></a>
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_restart.html" target="_top"><code class="classname">RESTART</code></a> is invoked.</p><p><a id="appease-cerrors"></a><b>Macro <a href="impnotes.html#appease-cerrors" class="olink"><code class="function">EXT:APPEASE-CERRORS</code></a>. </b>The macro <code class="code">(<a href="impnotes.html#appease-cerrors" class="olink"><code class="function">EXT:APPEASE-CERRORS</code></a> {<em class="replaceable"><code>form</code></em>}*)</code>
- executes the <em class="replaceable"><code>form</code></em>s; when a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/glo_c.html#continuable" target="_top">continuable</a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_error.html" target="_top"><code class="classname">ERROR</code></a> occurs whose <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_abortcm_c_cm_use-value.html" target="_top"><code class="function">CONTINUE</code></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_restart.html" target="_top"><code class="classname">RESTART</code></a>
- can be invoked non-interactively (this includes all <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/glo_c.html#continuable" target="_top">continuable</a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_error.html" target="_top"><code class="classname">ERROR</code></a>s <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_signal.html" target="_top"><code class="function">SIGNAL</code></a>ed
- by the function <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_cerror.html" target="_top"><code class="function">CERROR</code></a>), it is reported as a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_warning.html" target="_top"><code class="classname">WARNING</code></a>, and the
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_abortcm_c_cm_use-value.html" target="_top"><code class="function">CONTINUE</code></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_restart.html" target="_top"><code class="classname">RESTART</code></a> is invoked.</p><p><a id="abort-on-error"></a><b>Macro <a href="impnotes.html#abort-on-error" class="olink"><code class="function">EXT:ABORT-ON-ERROR</code></a>. </b>The macro <code class="code">(<a href="impnotes.html#abort-on-error" class="olink"><code class="function">EXT:ABORT-ON-ERROR</code></a> {<em class="replaceable"><code>form</code></em>}*)</code>
- executes the <em class="replaceable"><code>form</code></em>s; when an <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_error.html" target="_top"><code class="classname">ERROR</code></a> occurs,
- or when a <span class="keycap"><strong>Control</strong></span>+<span class="keysym">C</span> interrupt occurs,
- the error message is printed and the <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/res_abort.html" target="_top"><code class="function">ABORT</code></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_restart.html" target="_top"><code class="classname">RESTART</code></a> is invoked.
- </p><p><a id="exit-on-error"></a><b>Macro <a href="impnotes.html#exit-on-error" class="olink"><code class="function">EXT:EXIT-ON-ERROR</code></a>. </b>The macro <code class="code">(<a href="impnotes.html#exit-on-error" class="olink"><code class="function">EXT:EXIT-ON-ERROR</code></a> {<em class="replaceable"><code>form</code></em>}*)</code>
- executes the <em class="replaceable"><code>form</code></em>s; when an <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_error.html" target="_top"><code class="classname">ERROR</code></a> occurs,
- or when a <span class="keycap"><strong>Control</strong></span>+<span class="keysym">C</span> interrupt occurs,
- the error message is printed and <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> terminates with an error status.
- </p><p><a id="err-pr-bt"></a><b>Variable <a href="impnotes.html#err-pr-bt" class="olink"><code class="varname">CUSTOM:*REPORT-ERROR-PRINT-BACKTRACE*</code></a>. </b>When this variable is non-<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_nil.html" target="_top"><code class="constant">NIL</code></a> the error message printed by
- <a href="impnotes.html#abort-on-error" class="olink"><code class="function">EXT:ABORT-ON-ERROR</code></a> and <a href="impnotes.html#exit-on-error" class="olink"><code class="function">EXT:EXIT-ON-ERROR</code></a> includes the backtrace (stack).
- </p><p><a id="global-handler"></a><b>Function <a href="impnotes.html#global-handler" class="olink"><code class="function">EXT:SET-GLOBAL-HANDLER</code></a>. </b>The function <code class="code">(<a href="impnotes.html#global-handler" class="olink"><code class="function">EXT:SET-GLOBAL-HANDLER</code></a> <em class="replaceable"><code>condition</code></em> handler)</code>
- establishes a global handler for the <em class="replaceable"><code>condition</code></em>.
- The <em class="replaceable"><code>handler</code></em> should be <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_funcall.html" target="_top"><code class="function">FUNCALL</code></a>able (a
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_symbol.html" target="_top"><code class="classname">SYMBOL</code></a> or a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_function.html" target="_top"><code class="classname">FUNCTION</code></a>). If it returns, the next applicable
- handler is invoked, so if you do not want to land in the debugger, it
- should <span class="strong"><strong>not</strong></span> return.
- E.g., the option <code class="option"><a href="clisp.html#opt-on-error" class="olink">-on-error</a></code> <code class="option">abort</code> and the macro
- <a href="impnotes.html#abort-on-error" class="olink"><code class="function">EXT:ABORT-ON-ERROR</code></a> are implemented by installing the following handler:
- </p><pre class="programlisting">(defun sys::abortonerror (condition)
- (sys::report-error condition)
- (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_invoke-restart.html" target="_top"><code class="function">INVOKE-RESTART</code></a> (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_find-restart.html" target="_top"><code class="function">FIND-RESTART</code></a> '<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_abortcm_c_cm_use-value.html" target="_top"><code class="function">ABORT</code></a> condition)))</pre><p>
- When <em class="replaceable"><code>handler</code></em> is <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_nil.html" target="_top"><code class="constant">NIL</code></a>, the handler
- for <em class="replaceable"><code>condition</code></em> is removed and returned.
- When <em class="replaceable"><code>condition</code></em> is also <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_nil.html" target="_top"><code class="constant">NIL</code></a>, all global handlers are removed and returned
- as a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_list.html" target="_top"><code class="classname">LIST</code></a>, which can then be passed to <a href="impnotes.html#global-handler" class="olink"><code class="function">EXT:SET-GLOBAL-HANDLER</code></a> as the
- first argument and the handlers re-established.</p><p><a id="without-global-handlers"></a><b>Macro <a href="impnotes.html#without-global-handlers" class="olink"><code class="function">EXT:WITHOUT-GLOBAL-HANDLERS</code></a>. </b>The macro <code class="code">(<a href="impnotes.html#without-global-handlers" class="olink"><code class="function">EXT:WITHOUT-GLOBAL-HANDLERS</code></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-4-4.html" target="_top"><code class="literal">&BODY</code></a>
- <em class="replaceable"><code>body</code></em>)</code> removes all global handlers, executes <em class="replaceable"><code>body</code></em>, and
- then restores the handlers.</p><p><a id="with-restarts"></a><b>Macro <a class="link" href="#with-restarts" title="Macro EXT:WITH-RESTARTS"><code class="function">EXT:WITH-RESTARTS</code></a>. </b>The macro <a class="link" href="#with-restarts" title="Macro EXT:WITH-RESTARTS"><code class="function">EXT:WITH-RESTARTS</code></a> is like <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_restart-case.html" target="_top"><code class="function">RESTART-CASE</code></a>, except that the
- forms are specified after the restart clauses instead of before them,
- and the restarts created are not implicitly associated with any <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_condition.html" target="_top"><code class="classname">CONDITION</code></a>.
- <code class="code">(<a class="link" href="#with-restarts" title="Macro EXT:WITH-RESTARTS"><code class="function">EXT:WITH-RESTARTS</code></a> ({<em class="replaceable"><code>restart-clause</code></em>}*) {<em class="replaceable"><code>form</code></em>}*)</code> is
- therefore equivalent to <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_restart-case.html" target="_top"><code class="function">RESTART-CASE</code></a> (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/speope_progn.html" target="_top"><code class="function">PROGN</code></a> {<em class="replaceable"><code>form</code></em>}*)
- {<em class="replaceable"><code>restart-clause</code></em>}*)</code>.</p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="cond-nl"></a>9.1. Embedded Newlines in Condition Reports
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_9-1-3-1-3.html" target="_top">[CLHS-9.1.3.1.3]</a></h2></div></div></div><p>The error message prefix for the first line is “<span class="quote">*** - </span>”.
- All subsequent lines are indented by 6 characters.
- Long lines are broken on <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-1-4-7.html" target="_top">whitespace</a>
- (see <a class="xref" href="#fill-stream" title="30.2. Class EXT:FILL-STREAM">Section 30.2, “Class <code class="classname">EXT:FILL-STREAM</code>”</a>).</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="cond-dict"></a>9.2. The Conditions Dictionary
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_the_condi_s_dictionary.html" target="_top">[CLHS-9.2]</a></h2></div></div></div><p><a id="restart-case"></a><b>Macro <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_restart-case.html" target="_top"><code class="function">RESTART-CASE</code></a>. </b>In <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_restart-case.html" target="_top"><code class="function">RESTART-CASE</code></a> <em class="replaceable"><code>form</code></em> {<em class="replaceable"><code>restart-clause</code></em>}*)</code>,
- the argument list can also be specified after the keyword/value pairs
- instead of before them, i.e., each <em class="replaceable"><code>restart-clause</code></em> can be either
- <code class="code">(<code class="varname">restart-name</code> <a href="impnotes.html#script-exec" class="olink"><code class="varname">EXT:*ARGS*</code></a>
- {<em class="replaceable"><code>keyword-value-pair</code></em>}* {<em class="replaceable"><code>form</code></em>}*)</code>
- or <code class="code">(<em class="replaceable"><code>restart-name</code></em>
- {<em class="replaceable"><code>keyword-value-pair</code></em>}* <a href="impnotes.html#script-exec" class="olink"><code class="varname">EXT:*ARGS*</code></a> {<em class="replaceable"><code>form</code></em>}*)</code>.
- </p><p><a id="compute-restarts"></a><b>Function <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_compute-restarts.html" target="_top"><code class="function">COMPUTE-RESTARTS</code></a>. </b><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_compute-restarts.html" target="_top"><code class="function">COMPUTE-RESTARTS</code></a> and <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_find-restart.html" target="_top"><code class="function">FIND-RESTART</code></a> behave as specified in
- [<span class="citation"><a class="link" href="#ansi-cl" title="ANSI Common Lisp standard X3.226-1994 - Information Technology - Programming Language - Common Lisp">ANSI CL standard</a></span>]: If the optional <em class="replaceable"><code>condition</code></em> argument is non-<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_nil.html" target="_top"><code class="constant">NIL</code></a>,
- only <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_restart.html" target="_top"><code class="classname">RESTART</code></a>s associated with that <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_condition.html" target="_top"><code class="classname">CONDITION</code></a>
- and <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_restart.html" target="_top"><code class="classname">RESTART</code></a>s associated with no <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_condition.html" target="_top"><code class="classname">CONDITION</code></a> at all are considered.
- Therefore the effect of associating a restart to a condition is not to
- activate it, but to hide it from other conditions.
- This makes the syntax-dependent implicit association performed by
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_restart-case.html" target="_top"><code class="function">RESTART-CASE</code></a> nearly obsolete.</p></div></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="symbols"></a>Chapter 10. Symbols
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/chap-10.html" target="_top">[CLHS-10]</a></h2></div></div></div><p>No notes.</p></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="packages"></a>Chapter 11. Packages
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/chap-11.html" target="_top">[CLHS-11]</a></h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#pack-lock">11.1. Constraints on the <strong class="package">“<span class="quote">COMMON-LISP</span>”</strong> Package
- for Conforming Programs - package locking
- [CLHS-11.1.2.1.2]</a></span></dt><dt><span class="section"><a href="#clupack">11.2. The
- COMMON-LISP-USER Package
- [CLHS-11.1.2.2]</a></span></dt><dt><span class="section"><a href="#imppack">11.3. Implementation-Defined Packages
- [CLHS-11.1.2.4]</a></span></dt><dt><span class="section"><a href="#package-case">11.4. Package Case-Sensitivity</a></span></dt><dd><dl><dt><span class="section"><a href="#cs-clu">11.4.1. User Package for the Case-sensitive World</a></span></dt><dt><span class="section"><a href="#cs-pack-name">11.4.2. Package Names</a></span></dt><dt><span class="section"><a href="#cs-gensym-kwd">11.4.3. Gensyms and Keywords</a></span></dt><dt><span class="section"><a href="#case-sensitive-migration">11.4.4. Migration Tips</a></span></dt><dt><span class="section"><a href="#case-sensitive-startup">11.4.5. Using case-sensitive packages by default</a></span></dt></dl></dd><dt><span class="section"><a href="#pack-dict">11.5. The Packages Dictionary
- [CLHS-11.2]</a></span></dt><dd><dl><dt><span class="section"><a href="#make-pack">11.5.1. Function <code class="function">MAKE-PACKAGE</code></a></span></dt><dt><span class="section"><a href="#defpack">11.5.2. Macro <code class="function">DEFPACKAGE</code></a></span></dt><dt><span class="section"><a href="#re-export">11.5.3. Function <code class="function">EXT:RE-EXPORT</code></a></span></dt><dt><span class="section"><a href="#pack-inverted">11.5.4. Function <code class="function">EXT:PACKAGE-CASE-INVERTED-P</code></a></span></dt><dt><span class="section"><a href="#pack-sensitive">11.5.5. Function <code class="function">EXT:PACKAGE-CASE-SENSITIVE-P</code></a></span></dt></dl></dd></dl></div><div class="variablelist"><p class="title"><b>The [<span class="citation"><a class="link" href="#ansi-cl" title="ANSI Common Lisp standard X3.226-1994 - Information Technology - Programming Language - Common Lisp">ANSI CL standard</a></span>] packages present in <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a></b></p><dl><dt><span class="term"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_11-1-2-1.html" target="_top"><strong class="package">“<span class="quote">COMMON-LISP</span>”</strong></a></span></dt><dd>with the nicknames <strong class="package">“<span class="quote">CL</span>”</strong>
- and <strong class="package">“<span class="quote">LISP</span>”</strong></dd><dt><span class="term"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_11-1-2-2.html" target="_top"><strong class="package">“<span class="quote">COMMON-LISP-USER</span>”</strong></a></span></dt><dd>with the nicknames <strong class="package">“<span class="quote">CL-USER</span>”</strong>
- and <strong class="package">“<span class="quote">USER</span>”</strong></dd><dt><span class="term"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_11-1-2-3.html" target="_top"><strong class="package">“<span class="quote">KEYWORD</span>”</strong></a></span></dt><dd>with no nicknames
- </dd></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="pack-lock"></a>11.1. Constraints on the <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_11-1-2-1.html" target="_top"><strong class="package">“<span class="quote">COMMON-LISP</span>”</strong></a> Package
- for Conforming Programs - package locking
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_11-1-2-1-2.html" target="_top">[CLHS-11.1.2.1.2]</a></h2></div></div></div><p><b>Function <a class="link" href="#pack-lock" title="11.1. Constraints on the “COMMON-LISP” Package for Conforming Programs - package locking [CLHS-11.1.2.1.2]"><code class="function">EXT:PACKAGE-LOCK</code></a>. </b><a id="pack-lock-f" class="indexterm"></a>
- Packages can be “<span class="quote">locked</span>”.
- When a package is locked, attempts to change its symbol table or
- redefine functions which its symbols name result in a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/glo_c.html#continuable" target="_top">continuable</a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_error.html" target="_top"><code class="classname">ERROR</code></a>
- (continuing overrides locking for this operation).
- When <a class="link" href="#suppress-check-redef" title="Variable CUSTOM:*SUPPRESS-CHECK-REDEFINITION*"><code class="varname">CUSTOM:*SUPPRESS-CHECK-REDEFINITION*</code></a> is <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_t.html" target="_top"><code class="constant">T</code></a> (<span class="strong"><strong>not</strong></span> a good idea!), the <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_error.html" target="_top"><code class="classname">ERROR</code></a>
- is not <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_signal.html" target="_top"><code class="function">SIGNAL</code></a>ed for redefine operations.
- Function <code class="code">(<a class="link" href="#pack-lock" title="11.1. Constraints on the “COMMON-LISP” Package for Conforming Programs - package locking [CLHS-11.1.2.1.2]"><code class="function">EXT:PACKAGE-LOCK</code></a> <em class="replaceable"><code>package</code></em>)</code>
- returns the generalized boolean indicating whether the <em class="replaceable"><code>package</code></em> is locked.
- A package (or a list thereof) can be locked using <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_setfcm_psetf.html" target="_top"><code class="function">SETF</code></a>
- (<a class="link" href="#pack-lock" title="11.1. Constraints on the “COMMON-LISP” Package for Conforming Programs - package locking [CLHS-11.1.2.1.2]"><code class="function">EXT:PACKAGE-LOCK</code></a> <em class="replaceable"><code>package-or-list</code></em>) <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_t.html" target="_top"><code class="constant">T</code></a>)</code>.
- <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> locks its system packages (specified in the variable
- <a class="link" href="#pack-lock" title="11.1. Constraints on the “COMMON-LISP” Package for Conforming Programs - package locking [CLHS-11.1.2.1.2]"><code class="varname">CUSTOM:*SYSTEM-PACKAGE-LIST*</code></a>).</p><p><b>Macro <a class="link" href="#without-pack-lock"><code class="function">EXT:WITHOUT-PACKAGE-LOCK</code></a>. </b>If you want to evaluate some forms with certain packages unlocked,
- you can use
- <strong class="first"><em class="firstterm"><a class="link" href="#without-pack-lock"><code class="function">EXT:WITHOUT-PACKAGE-LOCK</code></a>
- <a id="without-pack-lock" class="indexterm"></a></em></strong>:
- </p><pre class="programlisting">
- (<a class="link" href="#without-pack-lock"><code class="function">EXT:WITHOUT-PACKAGE-LOCK</code></a> (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_11-1-2-1.html" target="_top"><strong class="package">“<span class="quote">COMMON-LISP</span>”</strong></a> <a class="link" href="#ext-pac"><strong class="package">“<span class="quote">EXT</span>”</strong></a> <a class="link" href="#classes" title="4.2. Classes [CLHS-4.3]"><strong class="package">“<span class="quote">CLOS</span>”</strong></a>)
- (defun restart () ...))
- </pre><p>
- or
- </p><pre class="programlisting">
- (<a class="link" href="#without-pack-lock"><code class="function">EXT:WITHOUT-PACKAGE-LOCK</code></a> (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_11-1-2-1.html" target="_top"><strong class="package">“<span class="quote">COMMON-LISP</span>”</strong></a>) (trace read-line))
- </pre><p>
- <code class="code">(<a class="link" href="#without-pack-lock"><code class="function">EXT:WITHOUT-PACKAGE-LOCK</code></a> () ...)</code>
- temporarily unlocks all packages in <a class="link" href="#pack-lock" title="11.1. Constraints on the “COMMON-LISP” Package for Conforming Programs - package locking [CLHS-11.1.2.1.2]"><code class="varname">CUSTOM:*SYSTEM-PACKAGE-LIST*</code></a>.</p><p><b>Variable <a class="link" href="#pack-lock" title="11.1. Constraints on the “COMMON-LISP” Package for Conforming Programs - package locking [CLHS-11.1.2.1.2]"><code class="varname">CUSTOM:*SYSTEM-PACKAGE-LIST*</code></a>. </b>This variable specifies the default packages to be locked by <a href="impnotes.html#image" class="olink"><code class="function">EXT:SAVEINITMEM</code></a>
- and unlocked by <a class="link" href="#without-pack-lock"><code class="function">EXT:WITHOUT-PACKAGE-LOCK</code></a> as a list of package names.
- You may add names to this list, e.g., a module will add its package,
- but you should <span class="strong"><strong>not</strong></span> remove <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> internal packages from this list.
- </p><p><b>Discussion - see also
- <a class="ulink" href="http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=3C3E7F57.7F80395%40pacbell.net" target="_top">the USENET posting</a> by
- <span class="author"><span class="firstname">Steven M.</span> <span class="surname">Haflich</span></span>. </b>This should prevent you from accidentally hosing yourself with
- </p><pre class="programlisting">
- (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defstruct.html" target="_top"><code class="function">DEFSTRUCT</code></a> instance ...)
- </pre><p>
- and allow enforcing modularity.
- Note that you will also get the <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/glo_c.html#continuable" target="_top">continuable</a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_error.html" target="_top"><code class="classname">ERROR</code></a> when you try to
- assign (with <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/spefor_setq.html" target="_top"><code class="function">SETQ</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_psetq.html" target="_top"><code class="function">PSETQ</code></a>, etc.) a value to an internal special
- variable living in a locked package and not accessible in your current
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/var_stpackagest.html" target="_top"><code class="varname">*PACKAGE*</code></a>, but only in the interpreted code and during compilation.
- There is no check for package locks in compiled code because of the
- performance considerations.
- </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="clupack"></a>11.2. The
- <strong class="package">“<span class="quote">COMMON-LISP-USER</span>”</strong> Package
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_11-1-2-2.html" target="_top">[CLHS-11.1.2.2]</a></h2></div></div></div><p>The <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_11-1-2-2.html" target="_top"><strong class="package">“<span class="quote">COMMON-LISP-USER</span>”</strong></a> package uses the <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_11-1-2-1.html" target="_top"><strong class="package">“<span class="quote">COMMON-LISP</span>”</strong></a> and <a class="link" href="#ext-pac"><strong class="package">“<span class="quote">EXT</span>”</strong></a> packages.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="imppack"></a>11.3. Implementation-Defined Packages
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_11-1-2-4.html" target="_top">[CLHS-11.1.2.4]</a></h2></div></div></div><p>The following additional packages exist:</p><div class="variablelist"><p class="title"><b>Implementation-Defined Packages</b></p><dl><dt><span class="term"><a class="link" href="#classes" title="4.2. Classes [CLHS-4.3]"><strong class="package">“<span class="quote">CLOS</span>”</strong></a></span></dt><dd><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_export.html" target="_top"><code class="function">EXPORT</code></a>s all <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/chap-7.html" target="_top"><span class="command"><strong>CLOS</strong></span></a>-specific symbols, including some
- <a class="link" href="#clos-diff" title="4.3. Deviations from ANSI CL standard">additional symbols</a>.
- </dd><dt><a id="sys-pac"></a><span class="term"><a class="link" href="#sys-pac"><strong class="package">“<span class="quote">SYSTEM</span>”</strong></a></span></dt><dd>has the nicknames <strong class="package">“<span class="quote">SYS</span>”</strong>
- and <strong class="package">“<span class="quote">COMPILER</span>”</strong>, and has no
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_export.html" target="_top"><code class="function">EXPORT</code></a>ed symbols. It defines many system internals.
- </dd><dt><a id="ext-pac"></a><span class="term"><a class="link" href="#ext-pac"><strong class="package">“<span class="quote">EXT</span>”</strong></a></span></dt><dd>
- is the umbrella package for all extensions: it imports and <a class="link" href="#re-export" title="11.5.3. Function EXT:RE-EXPORT"><code class="function">EXT:RE-EXPORT</code></a>s
- all the external symbols in all <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> extensions, so a simple
- <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_use-package.html" target="_top"><code class="function">USE-PACKAGE</code></a> "EXT")</code> is enough to
- make all the extensions available in the current package.
- This package uses packages (in addition to <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_11-1-2-1.html" target="_top"><strong class="package">“<span class="quote">COMMON-LISP</span>”</strong></a>):
- <a class="link" href="#dir-key" title="33.7. Directory Access"><strong class="package">“<span class="quote">LDAP</span>”</strong></a>, <a class="link" href="#syscalls" title="33.1. System Calls"><strong class="package">“<span class="quote">POSIX</span>”</strong></a>, <a class="link" href="#socket" title="32.4. Socket Streams"><strong class="package">“<span class="quote">SOCKET</span>”</strong></a>, <a class="link" href="#gstream" title="31.6. Generic streams"><strong class="package">“<span class="quote">GSTREAM</span>”</strong></a>, <a class="link" href="#gray" title="Chapter 30. Gray streams"><strong class="package">“<span class="quote">GRAY</span>”</strong></a>,
- <a class="link" href="#i18n" title="31.4. Internationalization of CLISP"><strong class="package">“<span class="quote">I18N</span>”</strong></a>, <a class="link" href="#customize" title="31.12. Customizing CLISP behavior"><strong class="package">“<span class="quote">CUSTOM</span>”</strong></a>.</dd><dt><span class="term"><a class="link" href="#encoding" title="31.5. Encodings"><strong class="package">“<span class="quote">CHARSET</span>”</strong></a></span></dt><dd>defines and <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_export.html" target="_top"><code class="function">EXPORT</code></a>s some character sets, for use with
- <a class="link" href="#make-encoding" title="31.5.4. Function EXT:MAKE-ENCODING"><code class="function">EXT:MAKE-ENCODING</code></a> and as <a class="link" href="#extfmt"><code class="constant">:EXTERNAL-FORMAT</code></a> argument.
- </dd><dt><span class="term"><a class="link" href="#dffi" title="32.3. The Foreign Function Call Facility"><strong class="package">“<span class="quote">FFI</span>”</strong></a></span></dt><dd>implements the <a class="link" href="#dffi" title="32.3. The Foreign Function Call Facility">foreign function
- interface</a>. Some platforms only.
- </dd><dt><span class="term"><a class="link" href="#screen" title="32.1. Random Screen Access"><strong class="package">“<span class="quote">SCREEN</span>”</strong></a></span></dt><dd>defines an API for <a class="link" href="#screen" title="32.1. Random Screen Access">random screen
- access</a>. Some platforms only.
- </dd><dt><span class="term"><a href="impnotes.html#package-case" class="olink"><strong class="package">“<span class="quote">CS-COMMON-LISP</span>”</strong></a><br /></span><span class="term"><a href="impnotes.html#cs-clu" class="olink"><strong class="package">“<span class="quote">CS-COMMON-LISP-USER</span>”</strong></a></span></dt><dd>case-sensitive versions of <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_11-1-2-1.html" target="_top"><strong class="package">“<span class="quote">COMMON-LISP</span>”</strong></a> and <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_11-1-2-2.html" target="_top"><strong class="package">“<span class="quote">COMMON-LISP-USER</span>”</strong></a>.
- See <a class="xref" href="#package-case" title="11.4. Package Case-Sensitivity">Section 11.4, “Package Case-Sensitivity”</a>.</dd></dl></div><p>All pre-existing packages except <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_11-1-2-2.html" target="_top"><strong class="package">“<span class="quote">COMMON-LISP-USER</span>”</strong></a> belong to the
- implementation, in the sense that the programs that do not follow
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_11-1-2-1-2.html" target="_top">Section 11.1.2.1.2</a>
- ("Constraints on the <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_11-1-2-1.html" target="_top"><strong class="package">“<span class="quote">COMMON-LISP</span>”</strong></a> Package for Conforming Programs")
- cause undefined behavior.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="package-case"></a>11.4. Package Case-Sensitivity</h2></div></div></div><div class="toc"><dl><dt><span class="section"><a href="#cs-clu">11.4.1. User Package for the Case-sensitive World</a></span></dt><dt><span class="section"><a href="#cs-pack-name">11.4.2. Package Names</a></span></dt><dt><span class="section"><a href="#cs-gensym-kwd">11.4.3. Gensyms and Keywords</a></span></dt><dt><span class="section"><a href="#case-sensitive-migration">11.4.4. Migration Tips</a></span></dt><dt><span class="section"><a href="#case-sensitive-startup">11.4.5. Using case-sensitive packages by default</a></span></dt></dl></div><p><a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> supports programs written with case sensitive symbols. For
- example, with case sensitive symbols, the symbols <code class="literal">cdr</code>
- (the function equivalent to <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/acc_rest.html" target="_top"><code class="function">REST</code></a>) and the symbol <code class="literal">CDR</code>
- (a user-defined type denoting a Call Data Record) are different and unrelated.
- </p><p>There are some incompatibilities between programs assuming case
- sensitive symbols and programs assuming the [<span class="citation"><a class="link" href="#ansi-cl" title="ANSI Common Lisp standard X3.226-1994 - Information Technology - Programming Language - Common Lisp">ANSI CL standard</a></span>] case insensitive symbols.
- For example, <code class="code">(eq 'KB 'Kb)</code> evaluates to false in a case
- sensitive world and to true in a case insensitive world. However, unlike some
- commercial <a class="ulink" href="http://www.lisp.org" target="_top"><span class="command"><strong>Common Lisp</strong></span></a> implementations, <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> allows both kinds of programs to
- coexist in the same process and interoperate with each other. Example:
- </p><div class="variablelist"><dl><dt><span class="term"><code class="filename">OLD.lisp</code></span></dt><dd><pre class="programlisting">
- (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_in-package.html" target="_top"><code class="function">IN-PACKAGE</code></a> "OLD")
- (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defun.html" target="_top"><code class="function">DEFUN</code></a> FOO () ...)
- </pre></dd><dt><span class="term"><code class="filename">modern.lisp</code></span></dt><dd><pre class="programlisting">
- (in-package "NEW")
- (defun bar () (old:foo))
- (symbol-name 'bar) ; ⇒ <code class="computeroutput">"bar"</code>
- </pre></dd></dl></div><p>This is achieved through specification of the symbol case policy at
- the package level. A <strong class="first"><em class="firstterm">modern package
- <a id="pack-modern" class="indexterm"></a></em></strong>
- is one that is declared to be both case-sensitive and case-inverted and
- which use the symbols from the <a href="impnotes.html#package-case" class="olink"><strong class="package">“<span class="quote">CS-COMMON-LISP</span>”</strong></a> package.</p><p>A <strong class="first"><em class="firstterm">case-sensitive package
- <a id="pack-case-sensitive" class="indexterm"></a>
- </em></strong> is one whose <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defpackage.html" target="_top"><code class="function">DEFPACKAGE</code></a> declaration (or <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_make-package.html" target="_top"><code class="function">MAKE-PACKAGE</code></a>
- creation form) has the option <code class="code">(<a class="link" href="#package-case" title="11.4. Package Case-Sensitivity"><code class="constant">:CASE-SENSITIVE</code></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_t.html" target="_top"><code class="constant">T</code></a>)</code>.
- In a case-sensitive package, the reader does <span class="strong"><strong>not</strong></span> uppercase the
- symbol name before calling <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_intern.html" target="_top"><code class="function">INTERN</code></a>. Similarly, the printer, when
- printing the <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_symbol-name.html" target="_top"><code class="function">SYMBOL-NAME</code></a> part of a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_symbol.html" target="_top"><code class="classname">SYMBOL</code></a> (i.e. the part after
- the package markers), behaves as if the readtable's case were set
- to <code class="constant">:PRESERVE</code>.
- See also <a class="xref" href="#pack-sensitive" title="11.5.5. Function EXT:PACKAGE-CASE-SENSITIVE-P">Section 11.5.5, “Function <code class="function">EXT:PACKAGE-CASE-SENSITIVE-P</code>”</a>.</p><p>A <strong class="first"><em class="firstterm">case-inverted package
- <a id="pack-case-inverted" class="indexterm"></a>
- </em></strong> is one whose <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defpackage.html" target="_top"><code class="function">DEFPACKAGE</code></a> declaration (or <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_make-package.html" target="_top"><code class="function">MAKE-PACKAGE</code></a>
- creation form) has the option <code class="code">(<a class="link" href="#package-case" title="11.4. Package Case-Sensitivity"><code class="constant">:CASE-INVERTED</code></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_t.html" target="_top"><code class="constant">T</code></a>)</code>.
- In the context of a case-inverted package, symbol names are
- case-inverted: upper case characters are mapped to lower case, lower
- case characters are mapped to upper case, and other characters are left
- untouched. Every symbol thus conceptually has two symbol names: an
- old-world symbol name and a modern-world symbol name, which is the
- case-inverted old-world name. The first symbol name is returned by the
- function <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_symbol-name.html" target="_top"><code class="function">SYMBOL-NAME</code></a>, the modern one by the
- function <code class="function">cs-cl:symbol-name</code>. The internal
- functions for creating or looking up symbols in a package, which
- traditionally took a string argument, now conceptually take two string
- arguments: old-style-string and inverted-string. Actually, a function
- like <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_intern.html" target="_top"><code class="function">INTERN</code></a> takes the old-style-string as argument and computes the
- inverted-string from it; whereas the
- function <code class="function">cs-cl:intern</code> takes the inverted-string as
- argument and computes the old-style-string from it.
- See also <a class="xref" href="#pack-inverted" title="11.5.4. Function EXT:PACKAGE-CASE-INVERTED-P">Section 11.5.4, “Function <code class="function">EXT:PACKAGE-CASE-INVERTED-P</code>”</a>.</p><p>For a few built-in functions, a variant for the case-inverted
- world is defined in the <a href="impnotes.html#package-case" class="olink"><strong class="package">“<span class="quote">CS-COMMON-LISP</span>”</strong></a> package, which has the nickname
- <strong class="package">“<span class="quote">CS-CL</span>”</strong>:</p><div class="variablelist"><dl><dt><span class="term"><code class="function">cs-cl:symbol-name</code></span></dt><dd>returns the case-inverted symbol name.
- </dd><dt><span class="term"><code class="function">cs-cl:intern</code><br /></span><span class="term"><code class="function">cs-cl:find-symbol</code></span></dt><dd>work consistently with
- <code class="function">cs-cl:symbol-name</code>.</dd><dt><span class="term"><code class="function">cs-cl:shadow</code><br /></span><span class="term"><code class="function">cs-cl:find-all-symbols</code><br /></span><span class="term"><code class="function">cs-cl:string=</code><br /></span><span class="term"><code class="function">cs-cl:string/=</code><br /></span><span class="term"><code class="function">cs-cl:string<</code><br /></span><span class="term"><code class="function">cs-cl:string></code><br /></span><span class="term"><code class="function">cs-cl:string<=</code><br /></span><span class="term"><code class="function">cs-cl:string>=</code><br /></span><span class="term"><code class="function">cs-cl:string-trim</code><br /></span><span class="term"><code class="function">cs-cl:string-left-trim</code><br /></span><span class="term"><code class="function">cs-cl:string-right-trim</code></span></dt><dd>convert a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_symbol.html" target="_top"><code class="classname">SYMBOL</code></a> to a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_string.html" target="_top"><code class="classname">STRING</code></a> and therefore
- exist in a variant that uses <code class="function">cs-cl:symbol-name</code>
- instead of <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_symbol-name.html" target="_top"><code class="function">SYMBOL-NAME</code></a>.</dd><dt><span class="term"><code class="function">cs-cl:make-package</code></span></dt><dd>creates a case-inverted <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_package.html" target="_top"><code class="classname">PACKAGE</code></a>.
- </dd></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="cs-clu"></a>11.4.1. User Package for the Case-sensitive World</h3></div></div></div><p>A package <a href="impnotes.html#cs-clu" class="olink"><strong class="package">“<span class="quote">CS-COMMON-LISP-USER</span>”</strong></a> is provided for the user to modify and work in.
- It plays the same role as <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_11-1-2-2.html" target="_top"><strong class="package">“<span class="quote">COMMON-LISP-USER</span>”</strong></a>, but for the case-sensitive
- world.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="cs-pack-name"></a>11.4.2. Package Names</h3></div></div></div><p>The handling of package names is unchanged. Package names are
- still usually uppercase. The package names are also subject to
- <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/acc_readtable-case.html" target="_top"><code class="function">READTABLE-CASE</code></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/var_streadtablest.html" target="_top"><code class="varname">*READTABLE*</code></a>)</code>.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="cs-gensym-kwd"></a>11.4.3. Gensyms and Keywords</h3></div></div></div><p>Note that gensyms and keywords are still treated traditionally:
- even in a case-sensitive package,</p><pre class="programlisting">
- (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_stringeqc_ng-not-lessp.html" target="_top"><code class="function">STRING=</code></a> '#:FooBar '#:foobar)
- ⇒ <code class="computeroutput"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_t.html" target="_top"><code class="constant">T</code></a></code>
- (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_eq.html" target="_top"><code class="function">EQ</code></a> ':KeyWord ':keyword)
- ⇒ <code class="computeroutput"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_t.html" target="_top"><code class="constant">T</code></a></code></pre><p>
- We believe this has a limited negative impact for the moment,
- but can be changed some time in the future.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="case-sensitive-migration"></a>11.4.4. Migration Tips</h3></div></div></div><p>The following practices will pose no problems when migrating to a
- modern case-sensitive world:
- </p><div class="itemizedlist"><ul type="disc"><li>Using [<span class="citation"><a class="link" href="#ansi-cl" title="ANSI Common Lisp standard X3.226-1994 - Information Technology - Programming Language - Common Lisp">ANSI CL standard</a></span>] symbols in lowercase.</li><li>Macros that create symbols by suffixing or prefixing
- given symbols.</li><li>Comparing symbol names as in
- <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_stringeqc_ng-not-lessp.html" target="_top"><code class="function">STRING=</code></a> (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_symbol-name.html" target="_top"><code class="function">SYMBOL-NAME</code></a> <em class="replaceable"><code>x</code></em>) (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_symbol-name.html" target="_top"><code class="function">SYMBOL-NAME</code></a> <em class="replaceable"><code>y</code></em>))</code>.
- </li></ul></div><p>The following practices will not work in a case-sensitive world or
- can give problems:
- </p><div class="itemizedlist"><ul type="disc"><li>Accessing the same symbol in both upper- and
- lowercase from the same source file.</li><li>Macros that create symbols in other packages than the
- original symbols.</li><li>Comparing <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_symbol-name.html" target="_top"><code class="function">SYMBOL-NAME</code></a> return values with <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_eq.html" target="_top"><code class="function">EQ</code></a>.
- </li><li>Comparing <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_symbol-name.html" target="_top"><code class="function">SYMBOL-NAME</code></a> x)</code> with
- <code class="code">(cs-cl:symbol-name y)</code>.</li></ul></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="case-sensitive-startup"></a>11.4.5. Using case-sensitive packages by default</h3></div></div></div><p><a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> supports a command-line option <code class="option"><a href="clisp.html#opt-modern" class="olink">-modern</a></code> that
- sets the <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/var_stpackagest.html" target="_top"><code class="varname">*PACKAGE*</code></a> initially to the <a href="impnotes.html#cs-clu" class="olink"><strong class="package">“<span class="quote">CS-COMMON-LISP-USER</span>”</strong></a> package, and
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/var_stprint-b_rint-radixst.html" target="_top"><code class="varname">*PRINT-BASE*</code></a> to <code class="constant">:DOWNCASE</code>.</p><p>For packages to be located in the “<span class="quote">modern</span>”
- (case-sensitive) world, you need to augment their <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defpackage.html" target="_top"><code class="function">DEFPACKAGE</code></a>
- declaration by adding the option <code class="code">(<a class="link" href="#package-case" title="11.4. Package Case-Sensitivity"><code class="constant">:MODERN</code></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_t.html" target="_top"><code class="constant">T</code></a>)</code>.</p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="pack-dict"></a>11.5. The Packages Dictionary
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_the_packa_s_dictionary.html" target="_top">[CLHS-11.2]</a></h2></div></div></div><div class="toc"><dl><dt><span class="section"><a href="#make-pack">11.5.1. Function <code class="function">MAKE-PACKAGE</code></a></span></dt><dt><span class="section"><a href="#defpack">11.5.2. Macro <code class="function">DEFPACKAGE</code></a></span></dt><dt><span class="section"><a href="#re-export">11.5.3. Function <code class="function">EXT:RE-EXPORT</code></a></span></dt><dt><span class="section"><a href="#pack-inverted">11.5.4. Function <code class="function">EXT:PACKAGE-CASE-INVERTED-P</code></a></span></dt><dt><span class="section"><a href="#pack-sensitive">11.5.5. Function <code class="function">EXT:PACKAGE-CASE-SENSITIVE-P</code></a></span></dt></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="make-pack"></a>11.5.1. Function <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_make-package.html" target="_top"><code class="function">MAKE-PACKAGE</code></a></h3></div></div></div><p>The default value of the <code class="constant">:USE</code> argument is
- <span class="data"><code class="literal">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_11-1-2-1.html" target="_top"><strong class="package">“<span class="quote">COMMON-LISP</span>”</strong></a>)</code></span>.</p><p><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_make-package.html" target="_top"><code class="function">MAKE-PACKAGE</code></a> accepts additional keyword arguments
- <a class="link" href="#package-case" title="11.4. Package Case-Sensitivity"><code class="constant">:CASE-SENSITIVE</code></a> and <a class="link" href="#package-case" title="11.4. Package Case-Sensitivity"><code class="constant">:CASE-INVERTED</code></a> (but <span class="strong"><strong>not</strong></span> <a class="link" href="#package-case" title="11.4. Package Case-Sensitivity"><code class="constant">:MODERN</code></a>!)
- </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="defpack"></a>11.5.2. Macro <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defpackage.html" target="_top"><code class="function">DEFPACKAGE</code></a></h3></div></div></div><p><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defpackage.html" target="_top"><code class="function">DEFPACKAGE</code></a> accepts additional options <a class="link" href="#package-case" title="11.4. Package Case-Sensitivity"><code class="constant">:CASE-SENSITIVE</code></a>,
- <a class="link" href="#package-case" title="11.4. Package Case-Sensitivity"><code class="constant">:CASE-INVERTED</code></a>, and <a class="link" href="#package-case" title="11.4. Package Case-Sensitivity"><code class="constant">:MODERN</code></a>.</p><p>When the package being defined already exists, it is modified as
- follows (and in this order):</p><div class="variablelist"><dl><dt><span class="term"><a class="link" href="#package-case" title="11.4. Package Case-Sensitivity"><code class="constant">:CASE-SENSITIVE</code></a></span></dt><dd>adjusted with <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_setfcm_psetf.html" target="_top"><code class="function">SETF</code></a> <a class="link" href="#pack-sensitive" title="11.5.5. Function EXT:PACKAGE-CASE-SENSITIVE-P"><code class="function">EXT:PACKAGE-CASE-SENSITIVE-P</code></a>)</code>
- (with a warning)</dd><dt><span class="term"><a class="link" href="#package-case" title="11.4. Package Case-Sensitivity"><code class="constant">:CASE-INVERTED</code></a></span></dt><dd>adjusted with <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_setfcm_psetf.html" target="_top"><code class="function">SETF</code></a> <a class="link" href="#pack-inverted" title="11.5.4. Function EXT:PACKAGE-CASE-INVERTED-P"><code class="function">EXT:PACKAGE-CASE-INVERTED-P</code></a>)</code>
- (with a warning)</dd><dt><span class="term"><a class="link" href="#package-case" title="11.4. Package Case-Sensitivity"><code class="constant">:MODERN</code></a></span></dt><dd><p>if <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_11-1-2-1.html" target="_top"><strong class="package">“<span class="quote">COMMON-LISP</span>”</strong></a> is being used, it is un-used and
- <a href="impnotes.html#package-case" class="olink"><strong class="package">“<span class="quote">CS-COMMON-LISP</span>”</strong></a> is used instead; also, <a href="impnotes.html#package-case" class="olink"><strong class="package">“<span class="quote">CS-COMMON-LISP</span>”</strong></a> is used instead of <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_11-1-2-1.html" target="_top"><strong class="package">“<span class="quote">COMMON-LISP</span>”</strong></a>
- throughout the <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defpackage.html" target="_top"><code class="function">DEFPACKAGE</code></a> form, e.g.,</p><pre class="programlisting">
- (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defpackage.html" target="_top"><code class="function">DEFPACKAGE</code></a> "FOO"
- (<a class="link" href="#package-case" title="11.4. Package Case-Sensitivity"><code class="constant">:MODERN</code></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_t.html" target="_top"><code class="constant">T</code></a>)
- (<code class="constant">:USE</code> "COMMON-LISP" "EXT"))
- </pre><p>is equivalent to</p><pre class="programlisting">
- (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_defpackage.html" target="_top"><code class="function">DEFPACKAGE</code></a> "FOO"
- (<a class="link" href="#package-case" title="11.4. Package Case-Sensitivity"><code class="constant">:CASE-SENSITIVE</code></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_t.html" target="_top"><code class="constant">T</code></a>)
- (<a class="link" href="#package-case" title="11.4. Package Case-Sensitivity"><code class="constant">:CASE-INVERTED</code></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_t.html" target="_top"><code class="constant">T</code></a>)
- (<code class="constant">:USE</code> "CS-COMMON-LISP" "EXT"))
- </pre><p><code class="code">(<a class="link" href="#package-case" title="11.4. Package Case-Sensitivity"><code class="constant">:MODERN</code></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_nil.html" target="_top"><code class="constant">NIL</code></a>)</code> reverts the
- effects of <code class="code">(<a class="link" href="#package-case" title="11.4. Package Case-Sensitivity"><code class="constant">:MODERN</code></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_t.html" target="_top"><code class="constant">T</code></a>)</code>.</p></dd><dt><span class="term"><code class="constant">:NICKNAMES</code></span></dt><dd>adjusted with <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_rename-package.html" target="_top"><code class="function">RENAME-PACKAGE</code></a>
- </dd><dt><span class="term"><code class="constant">:DOCUMENTATION</code></span></dt><dd>reset to the new value with <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_setfcm_psetf.html" target="_top"><code class="function">SETF</code></a>
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/stagenfun_doc_umentationcp.html" target="_top"><code class="function">DOCUMENTATION</code></a>)</code></dd><dt><span class="term"><code class="constant">:SHADOW</code></span></dt><dd>adjusted with <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_shadow.html" target="_top"><code class="function">SHADOW</code></a>
- </dd><dt><span class="term"><code class="constant">:SHADOWING-IMPORT-FROM</code></span></dt><dd>adjusted with <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_shadowing-import.html" target="_top"><code class="function">SHADOWING-IMPORT</code></a>
- </dd><dt><span class="term"><code class="constant">:USE</code></span></dt><dd>adjusted with <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_use-package.html" target="_top"><code class="function">USE-PACKAGE</code></a> and <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_unuse-package.html" target="_top"><code class="function">UNUSE-PACKAGE</code></a>
- </dd><dt><span class="term"><code class="constant">:IMPORT-FROM</code></span></dt><dd>adjusted with <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_import.html" target="_top"><code class="function">IMPORT</code></a>
- </dd><dt><span class="term"><code class="constant">:INTERN</code></span></dt><dd>adjusted with <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_intern.html" target="_top"><code class="function">INTERN</code></a> (but <span class="strong"><strong>not</strong></span> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_unintern.html" target="_top"><code class="function">UNINTERN</code></a>)
- </dd><dt><span class="term"><code class="constant">:EXPORT</code></span></dt><dd>adjusted with <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_intern.html" target="_top"><code class="function">INTERN</code></a> and <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_export.html" target="_top"><code class="function">EXPORT</code></a> (but <span class="strong"><strong>not</strong></span>
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_unexport.html" target="_top"><code class="function">UNEXPORT</code></a>)</dd><dt><span class="term"><code class="constant">:SIZE</code></span></dt><dd>ignored</dd></dl></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="re-export"></a>11.5.3. Function <a class="link" href="#re-export" title="11.5.3. Function EXT:RE-EXPORT"><code class="function">EXT:RE-EXPORT</code></a></h3></div></div></div><p>The function <code class="code">(<a class="link" href="#re-export" title="11.5.3. Function EXT:RE-EXPORT"><code class="function">EXT:RE-EXPORT</code></a> <em class="replaceable"><code>FROM-PACK</code></em>
- <em class="replaceable"><code>TO-PACK</code></em>)</code> re-<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_export.html" target="_top"><code class="function">EXPORT</code></a>s all external
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_symbol.html" target="_top"><code class="classname">SYMBOL</code></a>s from <em class="replaceable"><code>FROM-PACK</code></em> also from
- <em class="replaceable"><code>TO-PACK</code></em>, provided it already uses
- <em class="replaceable"><code>FROM-PACK</code></em>; and <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_signal.html" target="_top"><code class="function">SIGNAL</code></a>s an <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_error.html" target="_top"><code class="classname">ERROR</code></a> otherwise.
- </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="pack-inverted"></a>11.5.4. Function <a class="link" href="#pack-inverted" title="11.5.4. Function EXT:PACKAGE-CASE-INVERTED-P"><code class="function">EXT:PACKAGE-CASE-INVERTED-P</code></a></h3></div></div></div><p>Returns <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_t.html" target="_top"><code class="constant">T</code></a> if the argument is a
- <a class="link" href="#pack-case-inverted">case-inverted package</a>.
- This function is <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_setfcm_psetf.html" target="_top"><code class="function">SETF</code></a>able, although it is probably not a good idea
- to change the case-inverted status of an existing package.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="pack-sensitive"></a>11.5.5. Function <a class="link" href="#pack-sensitive" title="11.5.5. Function EXT:PACKAGE-CASE-SENSITIVE-P"><code class="function">EXT:PACKAGE-CASE-SENSITIVE-P</code></a></h3></div></div></div><p>Returns <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_t.html" target="_top"><code class="constant">T</code></a> if the argument is a
- <a class="link" href="#pack-case-sensitive">case-sensitive package</a>.
- This function is <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_setfcm_psetf.html" target="_top"><code class="function">SETF</code></a>able, although it is probably not a good idea
- to change the case-sensitive status of an existing package.</p></div></div></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="numbers"></a>Chapter 12. Numbers
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/chap-12.html" target="_top">[CLHS-12]</a></h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#num-types">12.1. Numeric Types</a></span></dt><dt><span class="section"><a href="#num-concepts">12.2. Number Concepts
- [CLHS-12.1]</a></span></dt><dd><dl><dt><span class="section"><a href="#byte-type">12.2.1. Byte Operations on Integers
- [CLHS-12.1.1.3.2]</a></span></dt><dt><span class="section"><a href="#float-subst">12.2.2. Rule of Float Substitutability
- [CLHS-12.1.3.3]</a></span></dt><dt><span class="section"><a href="#float-comp">12.2.3. Floating-point Computations
- [CLHS-12.1.4]</a></span></dt><dd><dl><dt><span class="section"><a href="#flocont">12.2.3.1. Rule of Float Precision Contagion
- [CLHS-12.1.4.4]</a></span></dt><dt><span class="section"><a href="#floratcont">12.2.3.2. Rule of Float and Rational Contagion
- [CLHS-12.1.4.1]</a></span></dt></dl></dd><dt><span class="section"><a href="#complex-comp">12.2.4. Complex Computations
- [CLHS-12.1.5]</a></span></dt><dt><span class="section"><a href="#complex-rational">12.2.5. Rule of
- Canonical Representation for Complex Rationals
- [CLHS-12.1.5.3]</a></span></dt></dl></dd><dt><span class="section"><a href="#num-dict">12.3. The Numbers Dictionary
- [CLHS-12.2]</a></span></dt><dd><dl><dt><span class="section"><a href="#random-state">12.3.1. Random Numbers</a></span></dt><dt><span class="section"><a href="#int-func-ext">12.3.2. Additional Integer Functions</a></span></dt><dt><span class="section"><a href="#float-notes">12.3.3. Floating Point Arithmetics</a></span></dt><dt><span class="section"><a href="#float-decode">12.3.4. Float Decoding
- [CLHS]</a></span></dt><dt><span class="section"><a href="#bool-ops">12.3.5. Boolean Operations
- [CLHS]</a></span></dt><dt><span class="section"><a href="#fixnum-lim">12.3.6. Fixnum Limits
- [CLHS]</a></span></dt><dt><span class="section"><a href="#bignum-lim">12.3.7. Bignum Limits
- [CLHS]</a></span></dt><dt><span class="section"><a href="#float-lim">12.3.8. Float Limits
- [CLHS]</a></span></dt></dl></dd></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="num-types"></a>12.1. Numeric Types</h2></div></div></div><p>The type <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_number.html" target="_top"><code class="classname">NUMBER</code></a> is the disjoint union of the types
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_real.html" target="_top"><code class="classname">REAL</code></a> and <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_complex.html" target="_top"><code class="classname">COMPLEX</code></a> (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/glo_e.html#exhaustive_partition" target="_top">“<span class="quote">exhaustive
- partition</span>”</a>)</p><p>The type <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_real.html" target="_top"><code class="classname">REAL</code></a> is the disjoint union of the types
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_rational.html" target="_top"><code class="classname">RATIONAL</code></a> and <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_float.html" target="_top"><code class="classname">FLOAT</code></a>.</p><p>The type <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_rational.html" target="_top"><code class="classname">RATIONAL</code></a> is the disjoint union of the types
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_integer.html" target="_top"><code class="classname">INTEGER</code></a> and <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_ratio.html" target="_top"><code class="classname">RATIO</code></a>.</p><p>The type <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_integer.html" target="_top"><code class="classname">INTEGER</code></a> is the disjoint union of the types
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_fixnum.html" target="_top"><code class="classname">FIXNUM</code></a> and <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_bignum.html" target="_top"><code class="classname">BIGNUM</code></a>.</p><p>The type <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_float.html" target="_top"><code class="classname">FLOAT</code></a> is the disjoint union of the types
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_short-flo_m_long-float.html" target="_top"><code class="classname">SHORT-FLOAT</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_short-flo_m_long-float.html" target="_top"><code class="classname">SINGLE-FLOAT</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_short-flo_m_long-float.html" target="_top"><code class="classname">DOUBLE-FLOAT</code></a> and
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_short-flo_m_long-float.html" target="_top"><code class="classname">LONG-FLOAT</code></a>.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="num-concepts"></a>12.2. Number Concepts
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_12-1.html" target="_top">[CLHS-12.1]</a></h2></div></div></div><div class="toc"><dl><dt><span class="section"><a href="#byte-type">12.2.1. Byte Operations on Integers
- [CLHS-12.1.1.3.2]</a></span></dt><dt><span class="section"><a href="#float-subst">12.2.2. Rule of Float Substitutability
- [CLHS-12.1.3.3]</a></span></dt><dt><span class="section"><a href="#float-comp">12.2.3. Floating-point Computations
- [CLHS-12.1.4]</a></span></dt><dd><dl><dt><span class="section"><a href="#flocont">12.2.3.1. Rule of Float Precision Contagion
- [CLHS-12.1.4.4]</a></span></dt><dt><span class="section"><a href="#floratcont">12.2.3.2. Rule of Float and Rational Contagion
- [CLHS-12.1.4.1]</a></span></dt></dl></dd><dt><span class="section"><a href="#complex-comp">12.2.4. Complex Computations
- [CLHS-12.1.5]</a></span></dt><dt><span class="section"><a href="#complex-rational">12.2.5. Rule of
- Canonical Representation for Complex Rationals
- [CLHS-12.1.5.3]</a></span></dt></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="byte-type"></a>12.2.1. Byte Operations on Integers
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_12-1-1-3-2.html" target="_top">[CLHS-12.1.1.3.2]</a></h3></div></div></div><p>Byte specifiers are objects of built-in type <a class="link" href="#byte-type" title="12.2.1. Byte Operations on Integers [CLHS-12.1.1.3.2]"><span class="type">BYTE</span></a>,
- not <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_integer.html" target="_top"><code class="classname">INTEGER</code></a>s.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="float-subst"></a>12.2.2. Rule of Float Substitutability
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_12-1-3-3.html" target="_top">[CLHS-12.1.3.3]</a></h3></div></div></div><p>When a mathematical function may return an exact (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_rational.html" target="_top"><code class="classname">RATIONAL</code></a>) or
- inexact (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_float.html" target="_top"><code class="classname">FLOAT</code></a>) result, it always returns the exact result.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="float-comp"></a>12.2.3. Floating-point Computations
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_12-1-4.html" target="_top">[CLHS-12.1.4]</a></h3></div></div></div><div class="toc"><dl><dt><span class="section"><a href="#flocont">12.2.3.1. Rule of Float Precision Contagion
- [CLHS-12.1.4.4]</a></span></dt><dt><span class="section"><a href="#floratcont">12.2.3.2. Rule of Float and Rational Contagion
- [CLHS-12.1.4.1]</a></span></dt></dl></div><p>There are four floating point types: <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_short-flo_m_long-float.html" target="_top"><code class="classname">SHORT-FLOAT</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_short-flo_m_long-float.html" target="_top"><code class="classname">SINGLE-FLOAT</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_short-flo_m_long-float.html" target="_top"><code class="classname">DOUBLE-FLOAT</code></a> and <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_short-flo_m_long-float.html" target="_top"><code class="classname">LONG-FLOAT</code></a>:
- </p><div class="informaltable"><a id="floating-types-table"></a><table border="1"><colgroup><col /><col /><col /><col /><col /></colgroup><thead><tr><th align="center">type</th><th align="center">sign</th><th align="center">mantissa</th><th align="center">exponent</th><th align="center">comment</th></tr></thead><tbody><tr><td align="center"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_short-flo_m_long-float.html" target="_top"><code class="classname">SHORT-FLOAT</code></a></td><td align="center">1 bit</td><td align="center">16+1 bits</td><td align="center">8 bits</td><td align="center">immediate</td></tr><tr><td align="center"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_short-flo_m_long-float.html" target="_top"><code class="classname">SINGLE-FLOAT</code></a></td><td align="center">1 bit</td><td align="center">23+1 bits</td><td align="center">8 bits</td><td align="center"><a class="ulink" href="http://grouper.ieee.org/groups/754/" target="_top">IEEE 754</a></td></tr><tr><td align="center"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_short-flo_m_long-float.html" target="_top"><code class="classname">DOUBLE-FLOAT</code></a></td><td align="center">1 bit</td><td align="center">52+1 bits</td><td align="center">11 bits</td><td align="center"><a class="ulink" href="http://grouper.ieee.org/groups/754/" target="_top">IEEE 754</a></td></tr><tr><td align="center"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_short-flo_m_long-float.html" target="_top"><code class="classname">LONG-FLOAT</code></a></td><td align="center">1 bit</td><td align="center">>=64 bits</td><td align="center">32 bits</td><td align="center">variable
- length</td></tr></tbody></table></div><p>The single and double float formats are those of the <a class="ulink" href="http://grouper.ieee.org/groups/754/" target="_top">IEEE 754</a>
- “<span class="quote">Standard for Binary Floating-Point Arithmetic</span>”,
- except that <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> does not support features like
- <code class="literal">±0</code>, <code class="literal">±inf</code>,
- <code class="literal">NaN</code>, gradual underflow, etc.
- <a class="ulink" href="http://www.lisp.org" target="_top"><span class="command"><strong>Common Lisp</strong></span></a> does not make use of these features, so, to reduce portability
- problems, <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> by design returns the same floating point results on
- all platforms (<a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> has a floating-point emulation built in for
- platforms that do not support <a class="ulink" href="http://grouper.ieee.org/groups/754/" target="_top">IEEE 754</a>). Note that
- </p><div class="itemizedlist"><ul type="disc"><li>When you got a <code class="literal">NaN</code>
- in your program, your program is broken, so you will spend time
- determining where the <code class="literal">NaN</code> came from.
- It is better to <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_signal.html" target="_top"><code class="function">SIGNAL</code></a> an <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_error.html" target="_top"><code class="classname">ERROR</code></a> in this case.</li><li>When you got unnormalized floats in your program,
- your results will have a greatly reduced accuracy anyway.
- Since <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> has the means to cope with this - <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_short-flo_m_long-float.html" target="_top"><code class="classname">LONG-FLOAT</code></a>s of
- <a class="link" href="#lfd" title="Arbitrary Precision Floats">variable precision</a> - it does not
- need unnormalized floats.</li></ul></div><p>
- This is why <a href="impnotes.html#features" class="olink"><code class="varname">*FEATURES*</code></a> does not contain the
- <code class="constant">:IEEE-FLOATING-POINT</code> keyword.</p><p><a id="lfd"></a><b>Arbitrary Precision Floats. </b><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_short-flo_m_long-float.html" target="_top"><code class="classname">LONG-FLOAT</code></a>s have variable mantissa length, which is a
- multiple of 16 (or 32, depending on the word size of the processor).
- The default length used when <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_short-flo_m_long-float.html" target="_top"><code class="classname">LONG-FLOAT</code></a>s are <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_readcm_re_g-whitespace.html" target="_top"><code class="function">READ</code></a> is given by the
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/glo_p.html#place" target="_top">place</a> <code class="code">(<a class="link" href="#lfd" title="Arbitrary Precision Floats"><code class="function">EXT:LONG-FLOAT-DIGITS</code></a>)</code>. It can be set by <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_setfcm_psetf.html" target="_top"><code class="function">SETF</code></a> (<a class="link" href="#lfd" title="Arbitrary Precision Floats"><code class="function">EXT:LONG-FLOAT-DIGITS</code></a>) <em class="replaceable"><code>n</code></em>)</code>,
- where <em class="replaceable"><code>n</code></em> is a positive <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_integer.html" target="_top"><code class="classname">INTEGER</code></a>. E.g., <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_setfcm_psetf.html" target="_top"><code class="function">SETF</code></a> (<a class="link" href="#lfd" title="Arbitrary Precision Floats"><code class="function">EXT:LONG-FLOAT-DIGITS</code></a>)
- 3322)</code> sets the default precision of <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_short-flo_m_long-float.html" target="_top"><code class="classname">LONG-FLOAT</code></a>s to about
- 1000 decimal digits.</p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="flocont"></a>12.2.3.1. Rule of Float Precision Contagion
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_12-1-4-4.html" target="_top">[CLHS-12.1.4.4]</a></h4></div></div></div><p>The floating point contagion is controlled by the variable
- <a class="link" href="#flocont" title="12.2.3.1. Rule of Float Precision Contagion [CLHS-12.1.4.4]"><code class="varname">CUSTOM:*FLOATING-POINT-CONTAGION-ANSI*</code></a>. When it is non-<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_nil.html" target="_top"><code class="constant">NIL</code></a>, contagion is done as per the
- [<span class="citation"><a class="link" href="#ansi-cl" title="ANSI Common Lisp standard X3.226-1994 - Information Technology - Programming Language - Common Lisp">ANSI CL standard</a></span>]: <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_short-flo_m_long-float.html" target="_top"><code class="classname">SHORT-FLOAT</code></a> → <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_short-flo_m_long-float.html" target="_top"><code class="classname">SINGLE-FLOAT</code></a> →
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_short-flo_m_long-float.html" target="_top"><code class="classname">DOUBLE-FLOAT</code></a> → <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_short-flo_m_long-float.html" target="_top"><code class="classname">LONG-FLOAT</code></a>.</p><div class="variablelist"><dl><dt><span class="term">Rationale:</span></dt><dd>See it pragmatically: save what you can and let
- others worry about the rest.</dd><dt><span class="term">Brief:</span></dt><dd><a class="ulink" href="http://www.lisp.org" target="_top"><span class="command"><strong>Common Lisp</strong></span></a> knows the number's precision, not accuracy, so
- preserving the precision can be accomplished reliably, while anything
- relating to the accuracy is just a speculation - only the user
- (programmer) knows what it is in each case.
- </dd><dt><span class="term">Detailed:</span></dt><dd>A computer float is an approximation of a real number.
- One can think of it as a random variable with the mean equal to
- itself and standard deviation equal to half the last significant digit.
- E.g., <code class="literal">1.5</code> is actually <code class="literal">1.5±0.05</code>.
- Consider adding <code class="literal">1.5</code> and <code class="literal">1.75</code>.
- [<span class="citation"><a class="link" href="#ansi-cl" title="ANSI Common Lisp standard X3.226-1994 - Information Technology - Programming Language - Common Lisp">ANSI CL standard</a></span>] requires that <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_pl.html" target="_top"><code class="function">+</code></a> 1.5 1.75)</code>
- return <code class="literal">3.25</code>, while traditional <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> would return
- <code class="literal">3.3</code>. The implied random variables are:
- <code class="literal">3.25±0.005</code> and <code class="literal">3.3±0.05</code>.
- Note that the traditional <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> way <span class="strong"><strong>does</strong></span>
- lie about the mean: the mean <span class="strong"><strong>is</strong></span> <code class="literal">3.25</code> and
- nothing else, while the standard way
- <span class="strong"><strong>could</strong></span> be lying about the deviation
- (accuracy): if the implied accuracy of <code class="literal">1.5 (0.05)</code>
- is its actual accuracy, then the accuracy of the result cannot be
- smaller that that. Therefore, since <a class="ulink" href="http://www.lisp.org" target="_top"><span class="command"><strong>Common Lisp</strong></span></a> has no way of knowing the
- actual accuracy, [<span class="citation"><a class="link" href="#ansi-cl" title="ANSI Common Lisp standard X3.226-1994 - Information Technology - Programming Language - Common Lisp">ANSI CL standard</a></span>] (and all the other standard engineering
- programming languages, like <a class="ulink" href="http://www.eskimo.com/~scs/C-faq/top.html" target="_top"><span class="command"><strong>C</strong></span></a>, <a class="dict" href="http://foldoc.org/?query=Fortran"><span class="command"><strong>Fortran</strong></span></a>
- etc) decides that keeping the accuracy correct is the business of the
- programmer, while the language should preserve what it can - the precision.
- </dd><dt><span class="term">Experience:</span></dt><dd> Rounding errors accumulate, and if a computation
- is conducted with insufficient precision, an outright incorrect
- result can be returned.
- (E.g., <code class="code">E(x<sup>2</sup>) -
- E(x)<sup>2</sup></code> can be negative!)
- The user should not mix floats of different precision (that's what
- <a class="link" href="#warn-fpc" title="Variable CUSTOM:*WARN-ON-FLOATING-POINT-CONTAGION*"><code class="varname">CUSTOM:*WARN-ON-FLOATING-POINT-CONTAGION*</code></a> is for), but one should not be penalized for this too
- harshly.</dd></dl></div><p>When <a class="link" href="#flocont" title="12.2.3.1. Rule of Float Precision Contagion [CLHS-12.1.4.4]"><code class="varname">CUSTOM:*FLOATING-POINT-CONTAGION-ANSI*</code></a> is <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_nil.html" target="_top"><code class="constant">NIL</code></a>, the traditional <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> method is used,
- namely the result of an arithmetic operation whose arguments are of
- different float types is rounded to the float format of the shortest
- (least precise) of the arguments: <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_rational.html" target="_top"><code class="classname">RATIONAL</code></a> →
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_short-flo_m_long-float.html" target="_top"><code class="classname">LONG-FLOAT</code></a> → <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_short-flo_m_long-float.html" target="_top"><code class="classname">DOUBLE-FLOAT</code></a> → <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_short-flo_m_long-float.html" target="_top"><code class="classname">SINGLE-FLOAT</code></a>
- → <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_short-flo_m_long-float.html" target="_top"><code class="classname">SHORT-FLOAT</code></a> (in contrast to <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_12-1-4-4.html" target="_top">12.1.4.4 Rule of Float Precision
- Contagion</a>!)</p><div class="variablelist"><dl><dt><span class="term">Rationale:</span></dt><dd> See it mathematically. Add intervals:
- <code class="code">{1.0 ± 1e-8} + {1.0 ± 1e-16} = {2.0 ±
- 1e-8}</code>. So, if we add <code class="literal">1.0s0</code> and
- <code class="literal">1.0d0</code>, we should get <code class="literal">2.0s0</code>.
- </dd><dt><span class="term">Brief:</span></dt><dd>Do not suggest accuracy of a result by giving it a
- precision that is greater than its accuracy.
- </dd><dt><span class="term">Example:</span></dt><dd><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_-.html" target="_top"><code class="function">-</code></a> (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_pl.html" target="_top"><code class="function">+</code></a> 1.7 <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_pi.html" target="_top"><code class="constant">PI</code></a>) <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_pi.html" target="_top"><code class="constant">PI</code></a>)</code>
- should not return <code class="literal">1.700000726342836417234L0</code>, it
- should return <code class="literal">1.7f0</code> (or
- <code class="literal">1.700001f0</code> if there were rounding errors).
- </dd><dt><span class="term">Experience:</span></dt><dd>If in a computation using thousands of <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_short-flo_m_long-float.html" target="_top"><code class="classname">SHORT-FLOAT</code></a>s,
- a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_short-flo_m_long-float.html" target="_top"><code class="classname">LONG-FLOAT</code></a> (like <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_pi.html" target="_top"><code class="constant">PI</code></a>) happens to be used, the long precision
- should not propagate throughout all the intermediate values.
- Otherwise, the long result would look precise, but its accuracy is
- only that of a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_short-flo_m_long-float.html" target="_top"><code class="classname">SHORT-FLOAT</code></a>; furthermore much computation time
- would be lost by calculating with <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_short-flo_m_long-float.html" target="_top"><code class="classname">LONG-FLOAT</code></a>s when only
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_short-flo_m_long-float.html" target="_top"><code class="classname">SHORT-FLOAT</code></a>s would be needed.
- </dd></dl></div><div class="simplesect" lang="en" xml:lang="en"><div class="titlepage"><div><div><h5 class="title"><a id="warn-fpc"></a>Variable <a class="link" href="#warn-fpc" title="Variable CUSTOM:*WARN-ON-FLOATING-POINT-CONTAGION*"><code class="varname">CUSTOM:*WARN-ON-FLOATING-POINT-CONTAGION*</code></a></h5></div></div></div><p>If the variable <a class="link" href="#warn-fpc" title="Variable CUSTOM:*WARN-ON-FLOATING-POINT-CONTAGION*"><code class="varname">CUSTOM:*WARN-ON-FLOATING-POINT-CONTAGION*</code></a> is non-<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_nil.html" target="_top"><code class="constant">NIL</code></a>, a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_warning.html" target="_top"><code class="classname">WARNING</code></a> is emitted for
- every coercion involving different floating-point types.
- As explained above, float precision contagion is not a good idea.
- You can avoid the contagion by doing all your computations with the
- same floating-point type (and using <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_float.html" target="_top"><code class="function">FLOAT</code></a> to convert all constants,
- e.g., <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_pi.html" target="_top"><code class="constant">PI</code></a>, to your preferred type).</p><p>This variable helps you eliminate all occurrences of float
- precision contagion: set it to <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_t.html" target="_top"><code class="constant">T</code></a> to have <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_signal.html" target="_top"><code class="function">SIGNAL</code></a> a
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_warning.html" target="_top"><code class="classname">WARNING</code></a> on float precision contagion; set it to <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_error.html" target="_top"><code class="function">ERROR</code></a> to have
- <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_signal.html" target="_top"><code class="function">SIGNAL</code></a> an <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_error.html" target="_top"><code class="classname">ERROR</code></a> on float precision contagion, so that you
- can look at the stack backtrace.</p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="floratcont"></a>12.2.3.2. Rule of Float and Rational Contagion
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_12-1-4-1.html" target="_top">[CLHS-12.1.4.1]</a></h4></div></div></div><p>The contagion between floating point and rational numbers is controlled
- by the variable <a class="link" href="#floratcont" title="12.2.3.2. Rule of Float and Rational Contagion [CLHS-12.1.4.1]"><code class="varname">CUSTOM:*FLOATING-POINT-RATIONAL-CONTAGION-ANSI*</code></a>. When it is non-<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_nil.html" target="_top"><code class="constant">NIL</code></a>, contagion is done as per
- the [<span class="citation"><a class="link" href="#ansi-cl" title="ANSI Common Lisp standard X3.226-1994 - Information Technology - Programming Language - Common Lisp">ANSI CL standard</a></span>]: <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_rational.html" target="_top"><code class="classname">RATIONAL</code></a> → <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_float.html" target="_top"><code class="classname">FLOAT</code></a>.</p><p>When <a class="link" href="#floratcont" title="12.2.3.2. Rule of Float and Rational Contagion [CLHS-12.1.4.1]"><code class="varname">CUSTOM:*FLOATING-POINT-RATIONAL-CONTAGION-ANSI*</code></a> is <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_nil.html" target="_top"><code class="constant">NIL</code></a>, the traditional <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> method is used,
- namely if the result is mathematically an exact rational number, this
- rational number is returned (in contrast to <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_12-1-4-1.html" target="_top">12.1.4.1 Rule of Float and Rational
- Contagion</a>!)</p><p><a class="link" href="#floratcont" title="12.2.3.2. Rule of Float and Rational Contagion [CLHS-12.1.4.1]"><code class="varname">CUSTOM:*FLOATING-POINT-RATIONAL-CONTAGION-ANSI*</code></a> has an effect only in those few cases when the mathematical
- result is exact although one of the arguments is a floating-point number,
- such as <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_st.html" target="_top"><code class="function">*</code></a> 0 1.618)</code>, <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_sl.html" target="_top"><code class="function">/</code></a> 0 1.618)</code>,
- <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_asincm_acoscm_atan.html" target="_top"><code class="function">ATAN</code></a> 0 1.0)</code>, <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_expcm_expt.html" target="_top"><code class="function">EXPT</code></a> 2.0 0)</code>,
- <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_phase.html" target="_top"><code class="function">PHASE</code></a> 2.718)</code>.</p><div class="simplesect" lang="en" xml:lang="en"><div class="titlepage"><div><div><h5 class="title"><a id="warn-fprc"></a>Variable <a class="link" href="#warn-fprc" title="Variable CUSTOM:*WARN-ON-FLOATING-POINT-RATIONAL-CONTAGION*"><code class="varname">CUSTOM:*WARN-ON-FLOATING-POINT-RATIONAL-CONTAGION*</code></a></h5></div></div></div><p>If the variable <a class="link" href="#warn-fprc" title="Variable CUSTOM:*WARN-ON-FLOATING-POINT-RATIONAL-CONTAGION*"><code class="varname">CUSTOM:*WARN-ON-FLOATING-POINT-RATIONAL-CONTAGION*</code></a> is non-<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_nil.html" target="_top"><code class="constant">NIL</code></a>, a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_warning.html" target="_top"><code class="classname">WARNING</code></a> is emitted for
- every avoidable coercion from a rational number to a floating-point number.
- You can avoid such coercions by calling <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_float.html" target="_top"><code class="function">FLOAT</code></a> to convert the particular
- rational numbers to your preferred floating-point type.</p><p>This variable helps you eliminate all occurrences of avoidable
- coercions to a floating-point number when a rational number result
- would be possible: set it to <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_t.html" target="_top"><code class="constant">T</code></a> to have <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_signal.html" target="_top"><code class="function">SIGNAL</code></a> a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_warning.html" target="_top"><code class="classname">WARNING</code></a>
- in such situations; set it to <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_error.html" target="_top"><code class="function">ERROR</code></a> to have <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_signal.html" target="_top"><code class="function">SIGNAL</code></a> an
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_error.html" target="_top"><code class="classname">ERROR</code></a> in such situations, so that you can look at the stack
- backtrace.</p></div><div class="simplesect" lang="en" xml:lang="en"><div class="titlepage"><div><div><h5 class="title"><a id="phasecont"></a>Variable <a class="link" href="#phasecont" title="Variable CUSTOM:*PHASE-ANSI*"><code class="varname">CUSTOM:*PHASE-ANSI*</code></a></h5></div></div></div><p>A similar variable, <a class="link" href="#phasecont" title="Variable CUSTOM:*PHASE-ANSI*"><code class="varname">CUSTOM:*PHASE-ANSI*</code></a>, controls the return
- value of <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_phase.html" target="_top"><code class="function">PHASE</code></a> when the argument is an exact nonnegative <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_real.html" target="_top"><code class="classname">REAL</code></a>.
- Namely, if <a class="link" href="#phasecont" title="Variable CUSTOM:*PHASE-ANSI*"><code class="varname">CUSTOM:*PHASE-ANSI*</code></a> is non-<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_nil.html" target="_top"><code class="constant">NIL</code></a>, it returns a floating-point zero;
- if <a class="link" href="#phasecont" title="Variable CUSTOM:*PHASE-ANSI*"><code class="varname">CUSTOM:*PHASE-ANSI*</code></a> is <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_nil.html" target="_top"><code class="constant">NIL</code></a>, it returns an exact zero. Example:
- <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_phase.html" target="_top"><code class="function">PHASE</code></a> 2/3)</code></p></div></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="complex-comp"></a>12.2.4. Complex Computations
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_12-1-5.html" target="_top">[CLHS-12.1.5]</a></h3></div></div></div><p>Complex numbers can have a real part and an imaginary part of
- different types. For example, <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_sqrtcm_isqrt.html" target="_top"><code class="function">SQRT</code></a> -9.0)</code> evaluates to
- the number <span class="data"><code class="literal"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8-11.html" target="_top"><span class="data"><code class="literal">#C</code></span></a>(0 3.0)</code></span>,
- which has a real part of exactly <code class="literal">0</code>,
- not only <span class="data"><code class="literal">0.0</code></span>
- (which would mean “<span class="quote">approximately 0</span>”).</p><p>The type specifier for this is <span class="type"><code class="literal">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_complex.html" target="_top"><code class="classname">COMPLEX</code></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_integer.html" target="_top"><code class="classname">INTEGER</code></a>
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_short-flo_m_long-float.html" target="_top"><code class="classname">SINGLE-FLOAT</code></a>)</code></span>, and <span class="type"><code class="literal">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_complex.html" target="_top"><code class="classname">COMPLEX</code></a> <code class="varname">type-of-real-part</code>
- <code class="varname">type-of-imaginary-part</code>)</code></span> in general.</p><p>The type specifier <span class="type"><code class="literal">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_complex.html" target="_top"><code class="classname">COMPLEX</code></a>
- <em class="replaceable"><code>type</code></em>)</code></span> is equivalent to <span class="type"><code class="literal">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_complex.html" target="_top"><code class="classname">COMPLEX</code></a> <em class="replaceable"><code>type</code></em> <em class="replaceable"><code>type</code></em>)</code></span>.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="complex-rational"></a>12.2.5. Rule of
- Canonical Representation for Complex Rationals
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_12-1-5-3.html" target="_top">[CLHS-12.1.5.3]</a></h3></div></div></div><p>Complex numbers can have a real part and an imaginary part of
- different types. If the imaginary part is <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_eql.html" target="_top"><code class="function">EQL</code></a> to <code class="literal">0</code>,
- the number is automatically converted to a real number.</p><p>This has the advantage that
- <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/speope_letcm_letst.html" target="_top"><code class="function">LET</code></a> ((x (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_sqrtcm_isqrt.html" target="_top"><code class="function">SQRT</code></a> -9.0))) (* x x))</code> - instead of
- evaluating to <span class="data"><code class="literal"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8-11.html" target="_top"><span class="data"><code class="literal">#C</code></span></a>(-9.0 0.0)</code></span>,
- with <em class="replaceable"><code>x</code></em> = <span class="data"><code class="literal"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8-11.html" target="_top"><span class="data"><code class="literal">#C</code></span></a>(0.0 3.0)</code></span> -
- evaluates to <span class="data"><code class="literal"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8-11.html" target="_top"><span class="data"><code class="literal">#C</code></span></a>(-9.0 0)</code></span> =
- <span class="data"><code class="literal">-9.0</code></span>,
- with <em class="replaceable"><code>x</code></em> = <span class="data"><code class="literal"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_2-4-8-11.html" target="_top"><span class="data"><code class="literal">#C</code></span></a>(0 3.0)</code></span>.</p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="num-dict"></a>12.3. The Numbers Dictionary
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_the_numbers_dictionary.html" target="_top">[CLHS-12.2]</a></h2></div></div></div><div class="toc"><dl><dt><span class="section"><a href="#random-state">12.3.1. Random Numbers</a></span></dt><dt><span class="section"><a href="#int-func-ext">12.3.2. Additional Integer Functions</a></span></dt><dt><span class="section"><a href="#float-notes">12.3.3. Floating Point Arithmetics</a></span></dt><dt><span class="section"><a href="#float-decode">12.3.4. Float Decoding
- [CLHS]</a></span></dt><dt><span class="section"><a href="#bool-ops">12.3.5. Boolean Operations
- [CLHS]</a></span></dt><dt><span class="section"><a href="#fixnum-lim">12.3.6. Fixnum Limits
- [CLHS]</a></span></dt><dt><span class="section"><a href="#bignum-lim">12.3.7. Bignum Limits
- [CLHS]</a></span></dt><dt><span class="section"><a href="#float-lim">12.3.8. Float Limits
- [CLHS]</a></span></dt></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="random-state"></a>12.3.1. Random Numbers</h3></div></div></div><p>To ease reproducibility, the variable <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/var_strandom-statest.html" target="_top"><code class="varname">*RANDOM-STATE*</code></a> is
- initialized to the same value on each invocation, so that
- </p><pre class="screen"><strong><code class="prompt">$</code></strong> clisp -norc <code class="option"><a href="clisp.html#opt-exec-expr" class="olink">-x</a></code> '(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_random.html" target="_top"><code class="function">RANDOM</code></a> 1s0)'</pre><p>
- will always print the same number.</p><p>If you want a new random state on each invocation, you can arrange
- for that by using <a href="impnotes.html#init-func" class="olink">init function</a>: </p><pre class="screen">
- <strong><code class="prompt">$</code></strong> clisp -norc <code class="option"><a href="clisp.html#opt-exec-expr" class="olink">-x</a></code> '(<a href="impnotes.html#image" class="olink"><code class="function">EXT:SAVEINITMEM</code></a> "foo" :init-function (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_lambda.html" target="_top"><code class="function">LAMBDA</code></a> () (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/spefor_setq.html" target="_top"><code class="function">SETQ</code></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/var_strandom-statest.html" target="_top"><code class="varname">*RANDOM-STATE*</code></a> (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_make-random-state.html" target="_top"><code class="function">MAKE-RANDOM-STATE</code></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_t.html" target="_top"><code class="constant">T</code></a>))))'
- <strong><code class="prompt">$</code></strong> clisp -norc <code class="option"><a href="clisp.html#opt-memfile" class="olink">-M</a></code> foo.mem <code class="option"><a href="clisp.html#opt-exec-expr" class="olink">-x</a></code> '(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_random.html" target="_top"><code class="function">RANDOM</code></a> 1s0)'
- </pre><p> or by placing <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/spefor_setq.html" target="_top"><code class="function">SETQ</code></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/var_strandom-statest.html" target="_top"><code class="varname">*RANDOM-STATE*</code></a>
- (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_make-random-state.html" target="_top"><code class="function">MAKE-RANDOM-STATE</code></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_t.html" target="_top"><code class="constant">T</code></a>))</code> into your <a href="clisp.html#opt-norc" class="olink">RC file</a>.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="int-func-ext"></a>12.3.2. Additional Integer Functions</h3></div></div></div><p><a id="factorial"></a><b>Function <code class="function">EXT:!</code> </b><code class="code">(<code class="function">EXT:!</code> <em class="replaceable"><code>n</code></em>)</code> returns the
- factorial of <em class="replaceable"><code>n</code></em>, <em class="replaceable"><code>n</code></em> being a nonnegative <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_integer.html" target="_top"><code class="classname">INTEGER</code></a>.</p><p><a id="exquo"></a><b>Function <code class="function">EXT:EXQUO</code>. </b><code class="code">(<code class="function">EXT:EXQUO</code> <em class="replaceable"><code>x</code></em> <em class="replaceable"><code>y</code></em>)</code> returns
- the integer quotient <code class="varname">x/y</code> of two integers
- <em class="replaceable"><code>x</code></em>,<em class="replaceable"><code>y</code></em>, and <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_signal.html" target="_top"><code class="function">SIGNAL</code></a>s an <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_error.html" target="_top"><code class="classname">ERROR</code></a> when the quotient is not
- integer. (This is more efficient than <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_sl.html" target="_top"><code class="function">/</code></a>.)</p><p><a id="xgcd"></a><b>Function <code class="function">EXT:XGCD</code>. </b><code class="code">(<code class="function">EXT:XGCD</code> <em class="replaceable"><code>x<sub>1</sub></code></em> ... <em class="replaceable"><code>x<sub>n</sub></code></em>)</code>
- returns the values <em class="replaceable"><code>l</code></em>, <em class="replaceable"><code>k<sub>1</sub></code></em>, ..., <em class="replaceable"><code>k<sub>n</sub></code></em>, where <em class="replaceable"><code>l</code></em> is the
- greatest common divisor of the integers <em class="replaceable"><code>x<sub>1</sub></code></em>, ..., <em class="replaceable"><code>x<sub>n</sub></code></em>, and
- <em class="replaceable"><code>k<sub>1</sub></code></em>, ..., <em class="replaceable"><code>k<sub>n</sub></code></em> are the integer coefficients such that
- </p><pre class="programlisting">
- <em class="replaceable"><code>l</code></em> = (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_gcd.html" target="_top"><code class="function">GCD</code></a> <em class="replaceable"><code>x<sub>1</sub></code></em> ... <em class="replaceable"><code>x<sub>n</sub></code></em>)
- = (+ (* <em class="replaceable"><code>k<sub>1</sub></code></em> <em class="replaceable"><code>x<sub>1</sub></code></em>) ... (* <em class="replaceable"><code>k<sub>n</sub></code></em> <em class="replaceable"><code>x<sub>n</sub></code></em>))
- </pre><p><a id="mod-expt"></a><b>Function <a class="link" href="#mod-expt" title="Function EXT:MOD-EXPT"><code class="function">EXT:MOD-EXPT</code></a>. </b><code class="code">(<a class="link" href="#mod-expt" title="Function EXT:MOD-EXPT"><code class="function">EXT:MOD-EXPT</code></a> <em class="replaceable"><code>k</code></em> <em class="replaceable"><code>l</code></em> <em class="replaceable"><code>m</code></em>)</code>
- is equivalent to <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_modcm_rem.html" target="_top"><code class="function">MOD</code></a> (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_expcm_expt.html" target="_top"><code class="function">EXPT</code></a> <em class="replaceable"><code>k</code></em> <em class="replaceable"><code>l</code></em>) <em class="replaceable"><code>m</code></em>)</code>
- except it is more efficient for very large arguments.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="float-notes"></a>12.3.3. Floating Point Arithmetics</h3></div></div></div><p><a id="expt"></a><b>Function <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_expcm_expt.html" target="_top"><code class="function">EXPT</code></a>. </b><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_expcm_expt.html" target="_top"><code class="function">EXPT</code></a> <em class="replaceable"><code>base</code></em> <em class="replaceable"><code>exponent</code></em>)</code>
- is not very precise if <em class="replaceable"><code>exponent</code></em> has a large
- absolute value.</p><p><a id="log"></a><b>Function <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_log.html" target="_top"><code class="function">LOG</code></a>. </b><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_log.html" target="_top"><code class="function">LOG</code></a> <em class="replaceable"><code>number</code></em> <em class="replaceable"><code>base</code></em>)</code> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_signal.html" target="_top"><code class="function">SIGNAL</code></a>s an <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_error.html" target="_top"><code class="classname">ERROR</code></a> if
- <code class="literal"><em class="replaceable"><code>base</code></em> = 1</code>.</p><p><a id="pi"></a><b>Constant <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_pi.html" target="_top"><code class="constant">PI</code></a>. </b>The value of <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_pi.html" target="_top"><code class="constant">PI</code></a> is a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_short-flo_m_long-float.html" target="_top"><code class="classname">LONG-FLOAT</code></a> with the precision given
- by <code class="code">(<a class="link" href="#lfd" title="Arbitrary Precision Floats"><code class="function">EXT:LONG-FLOAT-DIGITS</code></a>)</code>. When this precision is changed, the value of <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_pi.html" target="_top"><code class="constant">PI</code></a> is
- automatically recomputed. Therefore <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_pi.html" target="_top"><code class="constant">PI</code></a> is <span class="strong"><strong>not</strong></span> a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-1-2-1-1-3.html" target="_top">constant variable</a>.
- </p><p><a id="ucpt"></a><b>Function <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_upgraded-_ex-part-type.html" target="_top"><code class="function">UPGRADED-COMPLEX-PART-TYPE</code></a>. </b>When the argument is not a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/glo_r.html#recognizable_subtype" target="_top">recognizable subtype</a> or <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_real.html" target="_top"><code class="classname">REAL</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_upgraded-_ex-part-type.html" target="_top"><code class="function">UPGRADED-COMPLEX-PART-TYPE</code></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_signal.html" target="_top"><code class="function">SIGNAL</code></a>s an <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_error.html" target="_top"><code class="classname">ERROR</code></a>, otherwise it
- returns its argument (even though a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_complex.html" target="_top"><code class="classname">COMPLEX</code></a> number in <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> can
- always have <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_realpartcm_imagpart.html" target="_top"><code class="function">REALPART</code></a> and <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_realpartcm_imagpart.html" target="_top"><code class="function">IMAGPART</code></a> of any type) because it allows
- the most precise type inference.</p><p><a id="default-float-format"></a><b>Variable <a class="link" href="#default-float-format" title="Variable CUSTOM:*DEFAULT-FLOAT-FORMAT*"><code class="varname">CUSTOM:*DEFAULT-FLOAT-FORMAT*</code></a>. </b>When rational numbers are to be converted to floats (due to
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_float.html" target="_top"><code class="function">FLOAT</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_coerce.html" target="_top"><code class="function">COERCE</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_sqrtcm_isqrt.html" target="_top"><code class="function">SQRT</code></a> or a transcendental function), the result
- type is given by the variable <a class="link" href="#default-float-format" title="Variable CUSTOM:*DEFAULT-FLOAT-FORMAT*"><code class="varname">CUSTOM:*DEFAULT-FLOAT-FORMAT*</code></a>.</p><p><a id="no-underflow"></a><b>Macro <a class="link" href="#no-underflow" title="Macro EXT:WITHOUT-FLOATING-POINT-UNDERFLOW"><code class="function">EXT:WITHOUT-FLOATING-POINT-UNDERFLOW</code></a>. </b>The macro <code class="code">(<a class="link" href="#no-underflow" title="Macro EXT:WITHOUT-FLOATING-POINT-UNDERFLOW"><code class="function">EXT:WITHOUT-FLOATING-POINT-UNDERFLOW</code></a> {<em class="replaceable"><code>form</code></em>}*)</code> executes the
- <em class="replaceable"><code>form</code></em>s, with errors of type <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_floati_nt-underflow.html" target="_top"><code class="classname">FLOATING-POINT-UNDERFLOW</code></a> inhibited.
- Floating point operations will silently return zero instead of
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_signal.html" target="_top"><code class="function">SIGNAL</code></a>ing an <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_error.html" target="_top"><code class="classname">ERROR</code></a> of type <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_floati_nt-underflow.html" target="_top"><code class="classname">FLOATING-POINT-UNDERFLOW</code></a>.
- </p><p><a id="float-invalid-op"></a><b>Condition <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_floati_id-operation.html" target="_top"><code class="classname">FLOATING-POINT-INVALID-OPERATION</code></a>. </b>This <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_condition.html" target="_top"><code class="classname">CONDITION</code></a> is never <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_signal.html" target="_top"><code class="function">SIGNAL</code></a>ed by <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a>.</p><p><a id="float-inexact"></a><b>Condition <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_floati_oint-inexact.html" target="_top"><code class="classname">FLOATING-POINT-INEXACT</code></a>. </b>This <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/contyp_condition.html" target="_top"><code class="classname">CONDITION</code></a> is never <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_signal.html" target="_top"><code class="function">SIGNAL</code></a>ed by <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a>.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="float-decode"></a>12.3.4. Float Decoding
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_decode-fl_decode-float.html" target="_top">[CLHS]</a></h3></div></div></div><p><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_decode-fl_decode-float.html" target="_top"><code class="function">FLOAT-RADIX</code></a> always returns <span class="returnvalue">2</span>.</p><p><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_decode-fl_decode-float.html" target="_top"><code class="function">FLOAT-DIGITS</code></a> <em class="replaceable"><code>number</code></em> <em class="replaceable"><code>digits</code></em>)</code> coerces
- <em class="replaceable"><code>number</code></em> (a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_real.html" target="_top"><code class="classname">REAL</code></a>) to a floating point number with at least
- <em class="replaceable"><code>digits</code></em> mantissa digits. The following always evaluates to <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_t.html" target="_top"><code class="constant">T</code></a>:
- </p><pre class="programlisting">
- (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_eqcm_sleq__lteqcm_gteq.html" target="_top"><code class="function">>=</code></a> (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_decode-fl_decode-float.html" target="_top"><code class="function">FLOAT-DIGITS</code></a> (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_decode-fl_decode-float.html" target="_top"><code class="function">FLOAT-DIGITS</code></a> <em class="replaceable"><code>number</code></em> <em class="replaceable"><code>digits</code></em>)) <em class="replaceable"><code>digits</code></em>)
- </pre></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="bool-ops"></a>12.3.5. Boolean Operations
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_boole-_cm_boole-xor.html" target="_top">[CLHS]</a></h3></div></div></div><div class="table"><a id="bool-op-table"></a><p class="title"><b>Table 12.1. Boolean operations</b></p><div class="table-contents"><table summary="Boolean operations" border="1"><colgroup><col /><col /></colgroup><thead><tr><th align="left">constant</th><th align="left">value</th></tr></thead><tbody><tr><td align="left"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_boole-_cm_boole-xor.html" target="_top"><code class="constant">BOOLE-CLR</code></a></td><td align="left">0</td></tr><tr><td align="left"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_boole-_cm_boole-xor.html" target="_top"><code class="constant">BOOLE-SET</code></a></td><td align="left">15</td></tr><tr><td align="left"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_boole-_cm_boole-xor.html" target="_top"><code class="constant">BOOLE-1</code></a></td><td align="left">10</td></tr><tr><td align="left"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_boole-_cm_boole-xor.html" target="_top"><code class="constant">BOOLE-2</code></a></td><td align="left">12</td></tr><tr><td align="left"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_boole-_cm_boole-xor.html" target="_top"><code class="constant">BOOLE-C1</code></a></td><td align="left">5</td></tr><tr><td align="left"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_boole-_cm_boole-xor.html" target="_top"><code class="constant">BOOLE-C2</code></a></td><td align="left">3</td></tr><tr><td align="left"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_boole-_cm_boole-xor.html" target="_top"><code class="constant">BOOLE-AND</code></a></td><td align="left">8</td></tr><tr><td align="left"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_boole-_cm_boole-xor.html" target="_top"><code class="constant">BOOLE-IOR</code></a></td><td align="left">14</td></tr><tr><td align="left"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_boole-_cm_boole-xor.html" target="_top"><code class="constant">BOOLE-XOR</code></a></td><td align="left">6</td></tr><tr><td align="left"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_boole-_cm_boole-xor.html" target="_top"><code class="constant">BOOLE-EQV</code></a></td><td align="left">9</td></tr><tr><td align="left"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_boole-_cm_boole-xor.html" target="_top"><code class="constant">BOOLE-NAND</code></a></td><td align="left">7</td></tr><tr><td align="left"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_boole-_cm_boole-xor.html" target="_top"><code class="constant">BOOLE-NOR</code></a></td><td align="left">1</td></tr><tr><td align="left"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_boole-_cm_boole-xor.html" target="_top"><code class="constant">BOOLE-ANDC1</code></a></td><td align="left">4</td></tr><tr><td align="left"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_boole-_cm_boole-xor.html" target="_top"><code class="constant">BOOLE-ANDC2</code></a></td><td align="left">2</td></tr><tr><td align="left"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_boole-_cm_boole-xor.html" target="_top"><code class="constant">BOOLE-ORC1</code></a></td><td align="left">13</td></tr><tr><td align="left"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_boole-_cm_boole-xor.html" target="_top"><code class="constant">BOOLE-ORC2</code></a></td><td align="left">11</td></tr></tbody></table></div></div><br class="table-break" /></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fixnum-lim"></a>12.3.6. Fixnum Limits
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_most-p_ative-fixnum.html" target="_top">[CLHS]</a></h3></div></div></div><div class="table"><a id="fixnum-lim-table"></a><p class="title"><b>Table 12.2. Fixnum limits</b></p><div class="table-contents"><table summary="Fixnum limits" border="1"><colgroup><col align="center" /><col align="center" /><col align="center" /></colgroup><thead><tr><th align="center">CPU type</th><th align="center">32-bit CPU</th><th align="center">64-bit CPU</th></tr></thead><tbody><tr><td align="center"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_most-p_ative-fixnum.html" target="_top"><code class="constant">MOST-POSITIVE-FIXNUM</code></a></td><td align="center">2<sup>24</sup>-1 = 16777215</td><td align="center">2<sup>48</sup>-1 = 281474976710655</td></tr><tr><td align="center"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_most-p_ative-fixnum.html" target="_top"><code class="constant">MOST-NEGATIVE-FIXNUM</code></a></td><td align="center">-2<sup>24</sup> = -16777216</td><td align="center">-2<sup>48</sup> = -281474976710656</td></tr></tbody></table></div></div><br class="table-break" /></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="bignum-lim"></a>12.3.7. Bignum Limits
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_bignum.html" target="_top">[CLHS]</a></h3></div></div></div><p><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_bignum.html" target="_top"><code class="classname">BIGNUM</code></a>s are limited in size. Their maximum size is
- <code class="literal">32*(2<sup>16</sup>-2)=2097088</code> bits.
- The largest representable <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_bignum.html" target="_top"><code class="classname">BIGNUM</code></a> is therefore
- <code class="literal">2<sup>2097088</sup>-1</code>.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="float-lim"></a>12.3.8. Float Limits
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_most-p_d-long-float.html" target="_top">[CLHS]</a></h3></div></div></div><p>Together with <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_pi.html" target="_top"><code class="constant">PI</code></a>, the other <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_short-flo_m_long-float.html" target="_top"><code class="classname">LONG-FLOAT</code></a> constants
- </p><table class="simplelist" border="0" summary="Simple list"><tr><td><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_most-p_d-long-float.html" target="_top"><code class="constant">LEAST-NEGATIVE-LONG-FLOAT</code></a></td><td><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_short-_tive-epsilon.html" target="_top"><code class="constant">LONG-FLOAT-EPSILON</code></a></td></tr><tr><td><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_most-p_d-long-float.html" target="_top"><code class="constant">LEAST-NEGATIVE-NORMALIZED-LONG-FLOAT</code></a></td><td><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_short-_tive-epsilon.html" target="_top"><code class="constant">LONG-FLOAT-NEGATIVE-EPSILON</code></a></td></tr><tr><td><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_most-p_d-long-float.html" target="_top"><code class="constant">LEAST-POSITIVE-LONG-FLOAT</code></a></td><td><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_most-p_d-long-float.html" target="_top"><code class="constant">MOST-NEGATIVE-LONG-FLOAT</code></a></td></tr><tr><td><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_most-p_d-long-float.html" target="_top"><code class="constant">LEAST-POSITIVE-NORMALIZED-LONG-FLOAT</code></a></td><td><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_most-p_d-long-float.html" target="_top"><code class="constant">MOST-POSITIVE-LONG-FLOAT</code></a></td></tr></table><p>
- are recomputed whenever <code class="code">(<a class="link" href="#lfd" title="Arbitrary Precision Floats"><code class="function">EXT:LONG-FLOAT-DIGITS</code></a>)</code> is <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/mac_setfcm_psetf.html" target="_top"><code class="function">SETF</code></a>ed.
- They are <span class="strong"><strong>not</strong></span> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_3-1-2-1-1-3.html" target="_top">constant variable</a>s.</p></div></div></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="characters"></a>Chapter 13. Characters
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/chap-13.html" target="_top">[CLHS-13]</a></h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#char-script">13.1. Character Scripts
- [CLHS-13.1.2.1]</a></span></dt><dt><span class="section"><a href="#char-attrib">13.2. Character Attributes
- [CLHS-13.1.3]</a></span></dt><dd><dl><dt><span class="section"><a href="#input-char">13.2.1. Input Characters</a></span></dt></dl></dd><dt><span class="section"><a href="#graph-char">13.3. Graphic Characters
- [CLHS-13.1.4.1]</a></span></dt><dt><span class="section"><a href="#alpha-char">13.4. Alphabetic Characters
- [CLHS-13.1.4.2]</a></span></dt><dt><span class="section"><a href="#char-case">13.5. Characters With Case
- [CLHS-13.1.4.3]</a></span></dt><dd><dl><dt><span class="section"><a href="#char-invertcase">13.5.1. Function <code class="function">EXT:CHAR-INVERTCASE</code></a></span></dt><dt><span class="section"><a href="#char-ext">13.5.2. Case of Implementation-Defined Characters
- [CLHS-13.1.4.3.4]</a></span></dt></dl></dd><dt><span class="section"><a href="#num-char">13.6. Numeric Characters
- [CLHS-13.1.4.4]</a></span></dt><dt><span class="section"><a href="#char-ord">13.7. Ordering of Characters
- [CLHS-13.1.6]</a></span></dt><dt><span class="section"><a href="#clhs-newline">13.8. Treatment of Newline during Input and Output
- [CLHS-13.1.8]</a></span></dt><dt><span class="section"><a href="#char-int">13.9. Character Encodings
- [CLHS-13.1.9]</a></span></dt><dt><span class="section"><a href="#script-ext">13.10. Documentation
- of Implementation-Defined Scripts
- [CLHS-13.1.10]</a></span></dt><dt><span class="section"><a href="#char-dict">13.11. The Characters Dictionary
- [CLHS-13.2]</a></span></dt><dd><dl><dt><span class="section"><a href="#char-code">13.11.1. Function <code class="function">CHAR-CODE</code></a></span></dt><dt><span class="section"><a href="#base-char">13.11.2. Type <code class="classname">BASE-CHAR</code></a></span></dt><dt><span class="section"><a href="#char-width">13.11.3. Function <code class="function">EXT:CHAR-WIDTH</code></a></span></dt></dl></dd><dt><span class="section"><a href="#char-platform-dep">13.12. Platform-Dependent Characters</a></span></dt><dt><span class="section"><a href="#char-bits">13.13. Obsolete Constants</a></span></dt></dl></div><p>The characters are ordered according to a superset of the
- <a class="link" href="#charset-ASCII">ASCII character set</a>.</p>
- <!--#ifdef UNICODE-->
- <div class="variablelist"><dl><dt><span class="term"><span class="plat-dep">Platform Dependent: <span class="plat-dep">Only in <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> built <span class="strong"><strong>with</strong></span> compile-time flag <a class="ulink" href="http://www.unicode.org/" target="_top"><span class="platform">UNICODE</span></a></span></span></span></dt><dd>More precisely, <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> uses the 21-bit <a class="ulink" href="http://www.unicode.org/" target="_top"><span class="platform">UNICODE</span></a> 3.2
- character set (ISO 10646, also known as UCS-4).
- </dd></dl></div>
- <!--#endif-->
- <!--#if defined(ISOLATIN_CHS) && !defined(UNICODE)-->
- <div class="variablelist"><dl><dt><span class="term"><span class="plat-dep">Platform Dependent: <span class="plat-dep"><a class="ulink" href="http://www.UNIX-systems.org/online.html" target="_top"><span class="strong"><strong>UNIX</strong></span></a> (except <a class="ulink" href="http://www.next.com/" target="_top"><span class="platform">NeXTstep</span></a>),
- <a class="ulink" href="http://winehq.com/" target="_top"><span class="platform">Win32</span></a> platforms only, and only in
- <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> built <span class="strong"><strong>without</strong></span> compile-time flag <a class="ulink" href="http://www.unicode.org/" target="_top"><span class="platform">UNICODE</span></a>.</span></span></span></dt><dd><p>More precisely, <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> uses the ISO Latin-1 (ISO
- 8859-1) character set:
- </p><div class="informaltable"><a id="latin-1-table"></a><table border="1"><colgroup><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /></colgroup><thead><tr><th align="center"> </th><th align="center">#x0</th><th align="center">#x1</th><th align="center">#x2</th><th align="center">#x3</th><th align="center">#x4</th><th align="center">#x5</th><th align="center">#x6</th><th align="center">#x7</th><th align="center">#x8</th><th align="center">#x9</th><th align="center">#xA</th><th align="center">#xB</th><th align="center">#xC</th><th align="center">#xD</th><th align="center">#xE</th><th align="center">#xF</th></tr></thead><tbody><tr><td align="center">#x00</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td></tr><tr><td align="center">#x10</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td></tr><tr><td align="center">#x20</td><td align="center"> </td><td align="center">!</td><td align="center">"</td><td align="center">#</td><td align="center">$</td><td align="center">%</td><td align="center">&</td><td align="center">'</td><td align="center">(</td><td align="center">)</td><td align="center">*</td><td align="center">+</td><td align="center">,</td><td align="center">-</td><td align="center">.</td><td align="center">/</td></tr><tr><td align="center">#x30</td><td align="center">0</td><td align="center">1</td><td align="center">2</td><td align="center">3</td><td align="center">4</td><td align="center">5</td><td align="center">6</td><td align="center">7</td><td align="center">8</td><td align="center">9</td><td align="center">:</td><td align="center">;</td><td align="center"><</td><td align="center">=</td><td align="center">></td><td align="center">?</td></tr><tr><td align="center">#x40</td><td align="center">@</td><td align="center">A</td><td align="center">B</td><td align="center">C</td><td align="center">D</td><td align="center">E</td><td align="center">F</td><td align="center">G</td><td align="center">H</td><td align="center">I</td><td align="center">J</td><td align="center">K</td><td align="center">L</td><td align="center">M</td><td align="center">N</td><td align="center">O</td></tr><tr><td align="center">#x50</td><td align="center">P</td><td align="center">Q</td><td align="center">R</td><td align="center">S</td><td align="center">T</td><td align="center">U</td><td align="center">V</td><td align="center">W</td><td align="center">X</td><td align="center">Y</td><td align="center">Z</td><td align="center">[</td><td align="center">\</td><td align="center">]</td><td align="center">^</td><td align="center">_</td></tr><tr><td align="center">#x60</td><td align="center">`</td><td align="center">a</td><td align="center">b</td><td align="center">c</td><td align="center">d</td><td align="center">e</td><td align="center">f</td><td align="center">g</td><td align="center">h</td><td align="center">i</td><td align="center">j</td><td align="center">k</td><td align="center">l</td><td align="center">m</td><td align="center">n</td><td align="center">o</td></tr><tr><td align="center">#x70</td><td align="center">p</td><td align="center">q</td><td align="center">r</td><td align="center">s</td><td align="center">t</td><td align="center">u</td><td align="center">v</td><td align="center">w</td><td align="center">x</td><td align="center">y</td><td align="center">z</td><td align="center">{</td><td align="center">|</td><td align="center">}</td><td align="center">~</td><td align="center"> </td></tr><tr><td align="center">#x80</td><td align="center"> </td><td align="center"> </td><td align="center"> </td><td align="center"> </td><td align="center"> </td><td align="center"> </td><td align="center"> </td><td align="center">
- </td><td align="center"> </td><td align="center"> </td><td align="center"> </td><td align="center"> </td><td align="center"> </td><td align="center"> </td><td align="center"> </td><td align="center"> </td></tr><tr><td align="center">#x90</td><td align="center"> </td><td align="center"> </td><td align="center"> </td><td align="center"> </td><td align="center"> </td><td align="center"> </td><td align="center"> </td><td align="center">
- </td><td align="center"> </td><td align="center"> </td><td align="center"> </td><td align="center"> </td><td align="center"> </td><td align="center"> </td><td align="center"> </td><td align="center"> </td></tr><tr><td align="center">#xA0</td><td align="center"> </td><td align="center">¡</td><td align="center">¢</td><td align="center">£</td><td align="center">¤</td><td align="center">¥</td><td align="center">¦</td><td align="center">§</td><td align="center">¨</td><td align="center">©</td><td align="center">ª</td><td align="center">«</td><td align="center">¬</td><td align="center"></td><td align="center">®</td><td align="center">¯</td></tr><tr><td align="center">#xB0</td><td align="center">°</td><td align="center">±</td><td align="center">²</td><td align="center">³</td><td align="center">´</td><td align="center">µ</td><td align="center">¶</td><td align="center">·</td><td align="center">¸</td><td align="center">¹</td><td align="center">º</td><td align="center">»</td><td align="center">¼</td><td align="center">½</td><td align="center">¾</td><td align="center">¿</td></tr><tr><td align="center">#xC0</td><td align="center">À</td><td align="center">Á</td><td align="center">Â</td><td align="center">Ã</td><td align="center">Ä</td><td align="center">Å</td><td align="center">Æ</td><td align="center">Ç</td><td align="center">È</td><td align="center">É</td><td align="center">Ê</td><td align="center">Ë</td><td align="center">Ì</td><td align="center">Í</td><td align="center">Î</td><td align="center">Ï</td></tr><tr><td align="center">#xD0</td><td align="center">Ð</td><td align="center">Ñ</td><td align="center">Ò</td><td align="center">Ó</td><td align="center">Ô</td><td align="center">Õ</td><td align="center">Ö</td><td align="center">×</td><td align="center">Ø</td><td align="center">Ù</td><td align="center">Ú</td><td align="center">Û</td><td align="center">Ü</td><td align="center">Ý</td><td align="center">Þ</td><td align="center">ß</td></tr><tr><td align="center">#xE0</td><td align="center">à</td><td align="center">á</td><td align="center">â</td><td align="center">ã</td><td align="center">ä</td><td align="center">å</td><td align="center">æ</td><td align="center">ç</td><td align="center">è</td><td align="center">é</td><td align="center">ê</td><td align="center">ë</td><td align="center">ì</td><td align="center">í</td><td align="center">î</td><td align="center">ï</td></tr><tr><td align="center">#xF0</td><td align="center">ð</td><td align="center">ñ</td><td align="center">ò</td><td align="center">ó</td><td align="center">ô</td><td align="center">õ</td><td align="center">ö</td><td align="center">÷</td><td align="center">ø</td><td align="center">ù</td><td align="center">ú</td><td align="center">û</td><td align="center">ü</td><td align="center">ý</td><td align="center">þ</td><td align="center">ÿ</td></tr></tbody></table></div><p>
- Here ** are control characters, not graphic
- characters. (The characters left blank here cannot be represented in
- this character set).
- </p></dd></dl></div>
- <!--#endif-->
- <!--#if defined(NEXTSTEP_CHS) && !defined(UNICODE)-->
- <div class="variablelist"><dl><dt><span class="term"><span class="plat-dep">Platform Dependent: <span class="plat-dep"><a class="ulink" href="http://www.next.com/" target="_top"><span class="platform">NeXTstep</span></a> platforms
- only, and only in <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> built <span class="strong"><strong>without</strong></span> compile-time flag
- <a class="ulink" href="http://www.unicode.org/" target="_top"><span class="platform">UNICODE</span></a>.</span></span></span></dt><dd><p>More precisely, <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> uses the <a class="ulink" href="http://www.next.com/" target="_top"><span class="platform">NeXTstep</span></a> character set:
- </p><div class="informaltable"><a id="next-charset-table"></a><table border="1"><colgroup><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /><col /></colgroup><thead><tr><th align="center"> </th><th align="center">#x0</th><th align="center">#x1</th><th align="center">#x2</th><th align="center">#x3</th><th align="center">#x4</th><th align="center">#x5</th><th align="center">#x6</th><th align="center">#x7</th><th align="center">#x8</th><th align="center">#x9</th><th align="center">#xA</th><th align="center">#xB</th><th align="center">#xC</th><th align="center">#xD</th><th align="center">#xE</th><th align="center">#xF</th></tr></thead><tbody><tr><td align="center">#x00</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td></tr><tr><td align="center">#x10</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td><td align="center">**</td></tr><tr><td align="center">#x20</td><td align="center"> </td><td align="center">!</td><td align="center">"</td><td align="center">#</td><td align="center">$</td><td align="center">%</td><td align="center">&</td><td align="center">'</td><td align="center">(</td><td align="center">)</td><td align="center">*</td><td align="center">+</td><td align="center">,</td><td align="center">-</td><td align="center">.</td><td align="center">/</td></tr><tr><td align="center">#x30</td><td align="center">0</td><td align="center">1</td><td align="center">2</td><td align="center">3</td><td align="center">4</td><td align="center">5</td><td align="center">6</td><td align="center">7</td><td align="center">8</td><td align="center">9</td><td align="center">:</td><td align="center">;</td><td align="center"><</td><td align="center">=</td><td align="center">></td><td align="center">?</td></tr><tr><td align="center">#x40</td><td align="center">@</td><td align="center">A</td><td align="center">B</td><td align="center">C</td><td align="center">D</td><td align="center">E</td><td align="center">F</td><td align="center">G</td><td align="center">H</td><td align="center">I</td><td align="center">J</td><td align="center">K</td><td align="center">L</td><td align="center">M</td><td align="center">N</td><td align="center">O</td></tr><tr><td align="center">#x50</td><td align="center">P</td><td align="center">Q</td><td align="center">R</td><td align="center">S</td><td align="center">T</td><td align="center">U</td><td align="center">V</td><td align="center">W</td><td align="center">X</td><td align="center">Y</td><td align="center">Z</td><td align="center">[</td><td align="center">\</td><td align="center">]</td><td align="center">^</td><td align="center">_</td></tr><tr><td align="center">#x60</td><td align="center">`</td><td align="center">a</td><td align="center">b</td><td align="center">c</td><td align="center">d</td><td align="center">e</td><td align="center">f</td><td align="center">g</td><td align="center">h</td><td align="center">i</td><td align="center">j</td><td align="center">k</td><td align="center">l</td><td align="center">m</td><td align="center">n</td><td align="center">o</td></tr><tr><td align="center">#x70</td><td align="center">p</td><td align="center">q</td><td align="center">r</td><td align="center">s</td><td align="center">t</td><td align="center">u</td><td align="center">v</td><td align="center">w</td><td align="center">x</td><td align="center">y</td><td align="center">z</td><td align="center">{</td><td align="center">|</td><td align="center">}</td><td align="center">~</td><td align="center"> </td></tr><tr><td align="center">#x80</td><td align="center"> </td><td align="center">À</td><td align="center">Á</td><td align="center">Â</td><td align="center">Ã</td><td align="center">Ä</td><td align="center">Å</td><td align="center">Ç</td><td align="center">È</td><td align="center">É</td><td align="center">Ê</td><td align="center">Ë</td><td align="center">Ì</td><td align="center">Í</td><td align="center">Î</td><td align="center">Ï</td></tr><tr><td align="center">#x90</td><td align="center">Ð</td><td align="center">Ñ</td><td align="center">Ò</td><td align="center">Ó</td><td align="center">Ô</td><td align="center">Õ</td><td align="center">Ö</td><td align="center">Ù</td><td align="center">Ú</td><td align="center">Û</td><td align="center">Ü</td><td align="center">Ý</td><td align="center">Þ</td><td align="center">µ</td><td align="center">×</td><td align="center">÷</td></tr><tr><td align="center">#xA0</td><td align="center">©</td><td align="center">¡</td><td align="center">¢</td><td align="center">£</td><td align="center">⁄</td><td align="center">¥</td><td align="center">ƒ</td><td align="center">§</td><td align="center">¤</td><td align="center">’</td><td align="center">“</td><td align="center">«</td><td align="center">‹</td><td align="center">›</td><td align="center">fi</td><td align="center">fl</td></tr><tr><td align="center">#xB0</td><td align="center">®</td><td align="center">–</td><td align="center">†</td><td align="center">‡</td><td align="center">·</td><td align="center">¦</td><td align="center">¶</td><td align="center">•</td><td align="center">‚</td><td align="center">„</td><td align="center">”</td><td align="center">»</td><td align="center">…</td><td align="center">‰</td><td align="center">¬</td><td align="center">¿</td></tr><tr><td align="center">#xC0</td><td align="center">¹</td><td align="center">ˋ</td><td align="center">´</td><td align="center">ˆ</td><td align="center">˜</td><td align="center">¯</td><td align="center">˘</td><td align="center">˙</td><td align="center">¨</td><td align="center">²</td><td align="center">˚</td><td align="center">¸</td><td align="center">³</td><td align="center">˝</td><td align="center">˛</td><td align="center">ˇ</td></tr><tr><td align="center">#xD0</td><td align="center">—</td><td align="center">±</td><td align="center">¼</td><td align="center">½</td><td align="center">¾</td><td align="center">à</td><td align="center">á</td><td align="center">â</td><td align="center">ã</td><td align="center">ä</td><td align="center">å</td><td align="center">ç</td><td align="center">è</td><td align="center">é</td><td align="center">ê</td><td align="center">ë</td></tr><tr><td align="center">#xE0</td><td align="center">ì</td><td align="center">Æ</td><td align="center">í</td><td align="center">ª</td><td align="center">î</td><td align="center">ï</td><td align="center">ð</td><td align="center">ñ</td><td align="center">Ł</td><td align="center">Ø</td><td align="center">Œ</td><td align="center">º</td><td align="center">ò</td><td align="center">ó</td><td align="center">ô</td><td align="center">õ</td></tr><tr><td align="center">#xF0</td><td align="center">ö</td><td align="center">æ</td><td align="center">ù</td><td align="center">ú</td><td align="center">û</td><td align="center">ı</td><td align="center">ü</td><td align="center">ý</td><td align="center">ł</td><td align="center">ø</td><td align="center">œ</td><td align="center">ß</td><td align="center">þ</td><td align="center">ÿ</td><td align="center"> </td><td align="center"> </td></tr></tbody></table></div><p>
- Here ** are control characters, not graphic
- characters. (The characters left blank here cannot be represented in
- this character set).
- </p></dd></dl></div>
- <!--#endif-->
- <div class="table"><a id="standard-char-table"></a><p class="title"><b>Table 13.1. Standard characters</b></p><div class="table-contents"><table summary="Standard characters" border="1"><colgroup><col /><col /></colgroup><thead><tr><th align="center">character</th><th align="center">code</th></tr></thead><tbody><tr><td align="center"><span class="keysym">#\Space</span></td><td align="center"><span class="keycode">#x20</span></td></tr><tr><td align="center"><span class="keysym">#\Newline</span></td><td align="center"><span class="keycode">#x0A</span></td></tr></tbody></table></div></div><br class="table-break" /><div class="table"><a id="semi-standard-char-table"></a><p class="title"><b>Table 13.2. Semi-standard characters</b></p><div class="table-contents"><table summary="Semi-standard characters" border="1"><colgroup><col /><col /></colgroup><thead><tr><th align="center">character</th><th align="center">code</th></tr></thead><tbody><tr><td align="center"><span class="keysym">#\Backspace</span></td><td align="center"><span class="keycode">#x08</span></td></tr><tr><td align="center"><span class="keysym">#\Tab</span></td><td align="center"><span class="keycode">#x09</span></td></tr><tr><td align="center"><span class="keysym">#\Linefeed</span></td><td align="center"><span class="keycode">#x0A</span></td></tr><tr><td align="center"><span class="keysym">#\Page</span></td><td align="center"><span class="keycode">#x0C</span></td></tr><tr><td align="center"><span class="keysym">#\Return</span></td><td align="center"><span class="keycode">#x0D</span></td></tr></tbody></table></div></div><br class="table-break" /><p><span class="keysym">#\Newline</span> is the <a class="link" href="#newline" title="31.5.3. Line Terminators">line terminator</a>.</p><div class="table"><a id="extra-named-chars-table"></a><p class="title"><b>Table 13.3. Additional Named Characters</b></p><div class="table-contents"><table summary="Additional Named Characters" border="1"><colgroup><col /><col /></colgroup><thead><tr><th align="center">character</th><th align="center">code</th></tr></thead><tbody><tr><td align="center"><span class="keysym">#\Null</span></td><td align="center"><span class="keycode">#x00</span></td></tr><tr><td align="center"><span class="keysym">#\Bell</span></td><td align="center"><span class="keycode">#x07</span></td></tr><tr><td align="center"><span class="keysym">#\Escape</span></td><td align="center"><span class="keycode">#x1B</span></td></tr></tbody></table></div></div><br class="table-break" /><div class="table"><a id="ctrl-char-table"></a><p class="title"><b>Table 13.4. Additional syntax for characters with code from
- <span class="keycode">#x00</span> to <span class="keycode">#x1F</span>:</b></p><div class="table-contents"><table summary="Additional syntax for characters with code from #x00 to #x1F:" border="1"><colgroup><col /><col /></colgroup><thead><tr><th align="center">character</th><th align="center">code</th></tr></thead><tbody><tr><td align="center"><span class="keysym">#\^@</span></td><td align="center"><span class="keycode">#x00</span></td></tr><tr><td align="center"><span class="keysym">#\^A</span> … <span class="keysym">#\^Z</span></td><td align="center"><span class="keycode">#x01</span> …
- <span class="keycode">#x1A</span></td></tr><tr><td align="center"><span class="keysym">#\^[</span></td><td align="center"><span class="keycode">#x1B</span></td></tr><tr><td align="center"><span class="keysym">#\^\</span></td><td align="center"><span class="keycode">#x1C</span></td></tr><tr><td align="center"><span class="keysym">#\^]</span></td><td align="center"><span class="keycode">#x1D</span></td></tr><tr><td align="center"><span class="keysym">#\^^</span></td><td align="center"><span class="keycode">#x1E</span></td></tr><tr><td align="center"><span class="keysym">#\^_</span></td><td align="center"><span class="keycode">#x1F</span></td></tr></tbody></table></div></div><br class="table-break" /><p>See also <a class="xref" href="#sharpsign-backslash" title="2.6.1. Sharpsign Backslash [CLHS-2.4.8.1]">Section 2.6.1, “Sharpsign Backslash
- [CLHS-2.4.8.1]”</a>.</p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="char-script"></a>13.1. Character Scripts
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_13-1-2-1.html" target="_top">[CLHS-13.1.2.1]</a></h2></div></div></div><p>The only defined character script is the type <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_character.html" target="_top"><code class="classname">CHARACTER</code></a>
- itself.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="char-attrib"></a>13.2. Character Attributes
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_13-1-3.html" target="_top">[CLHS-13.1.3]</a></h2></div></div></div><div class="toc"><dl><dt><span class="section"><a href="#input-char">13.2.1. Input Characters</a></span></dt></dl></div><p>Characters have no implementation-defined or <a class="xref" href="#CLtL1" title="Common Lisp: the Language (1st Edition)">[<abbr class="abbrev">CLtL1</abbr>]</a> font and bit
- attributes. All characters are simple characters.</p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="input-char"></a>13.2.1. Input Characters</h3></div></div></div><p>For backward compatibility, there is a class <a class="link" href="#input-char" title="13.2.1. Input Characters"><code class="classname">SYS::INPUT-CHARACTER</code></a>
- representing either a character with font and bits, or a keystroke.
- The following functions work with objects of types <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_character.html" target="_top"><code class="classname">CHARACTER</code></a>
- and <a class="link" href="#input-char" title="13.2.1. Input Characters"><code class="classname">SYS::INPUT-CHARACTER</code></a>.
- Note that <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_eql.html" target="_top"><code class="function">EQL</code></a> or <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_equal.html" target="_top"><code class="function">EQUAL</code></a> are equivalent to <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_eq.html" target="_top"><code class="function">EQ</code></a> on objects of type
- <a class="link" href="#input-char" title="13.2.1. Input Characters"><code class="classname">SYS::INPUT-CHARACTER</code></a>.</p><div class="variablelist"><dl><dt><span class="term"><code class="constant">EXT:CHAR-FONT-LIMIT</code> = 16</span></dt><dd>The system uses only font 0.
- </dd><dt><span class="term"><code class="constant">EXT:CHAR-BITS-LIMIT</code> = 16</span></dt><dd><p>Character bits:
- </p><div class="informaltable"><a id="bit-table"></a><table border="1"><colgroup><col /><col /></colgroup><thead><tr><th align="center">key</th><th align="center">value</th></tr></thead><tbody><tr><td align="center"><code class="constant">:CONTROL</code></td><td align="center"><a class="link" href="#char-bits" title="13.13. Obsolete Constants"><code class="constant">EXT:CHAR-CONTROL-BIT</code></a></td></tr><tr><td align="center"><code class="constant">:META</code></td><td align="center"><a class="link" href="#char-bits" title="13.13. Obsolete Constants"><code class="constant">EXT:CHAR-META-BIT</code></a></td></tr><tr><td align="center"><code class="constant">:SUPER</code></td><td align="center"><a class="link" href="#char-bits" title="13.13. Obsolete Constants"><code class="constant">EXT:CHAR-SUPER-BIT</code></a></td></tr><tr><td align="center"><code class="constant">:HYPER</code></td><td align="center"><a class="link" href="#char-bits" title="13.13. Obsolete Constants"><code class="constant">EXT:CHAR-HYPER-BIT</code></a></td></tr></tbody></table></div></dd><dt><span class="term"><code class="code">(<code class="function">EXT:CHAR-FONT</code>
- <em class="replaceable"><code>object</code></em>)</code></span></dt><dd>returns the font of a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_character.html" target="_top"><code class="classname">CHARACTER</code></a> or <a class="link" href="#input-char" title="13.2.1. Input Characters"><code class="classname">SYS::INPUT-CHARACTER</code></a>.
- </dd><dt><span class="term"><code class="code">(<code class="function">EXT:CHAR-BITS</code>
- <em class="replaceable"><code>object</code></em>)</code></span></dt><dd>returns the bits of a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_character.html" target="_top"><code class="classname">CHARACTER</code></a> or <a class="link" href="#input-char" title="13.2.1. Input Characters"><code class="classname">SYS::INPUT-CHARACTER</code></a>.
- </dd><dt><span class="term"><code class="code">(<code class="function">EXT:MAKE-CHAR</code>
- <em class="replaceable"><code>char</code></em> [<em class="replaceable"><code>bits</code></em>
- [<em class="replaceable"><code>font</code></em>]])</code></span></dt><dd>returns a new <a class="link" href="#input-char" title="13.2.1. Input Characters"><code class="classname">SYS::INPUT-CHARACTER</code></a>, or <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_nil.html" target="_top"><code class="constant">NIL</code></a> if such a
- character cannot be created.</dd><dt><span class="term"><code class="code">(<code class="function">EXT:CHAR-BIT</code>
- <em class="replaceable"><code>object</code></em> <em class="replaceable"><code>name</code></em>)</code></span></dt><dd>returns <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_t.html" target="_top"><code class="constant">T</code></a> if the named bit is set in <em class="replaceable"><code>object</code></em>,
- else <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_nil.html" target="_top"><code class="constant">NIL</code></a>.</dd><dt><span class="term"><code class="code">(<code class="function">EXT:SET-CHAR-BIT</code>
- <em class="replaceable"><code>object</code></em> <em class="replaceable"><code>name</code></em> <em class="replaceable"><code>new-value</code></em>)</code></span></dt><dd>returns a new <a class="link" href="#input-char" title="13.2.1. Input Characters"><code class="classname">SYS::INPUT-CHARACTER</code></a> with the named bit set or
- unset, depending on the <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_boolean.html" target="_top"><code class="classname">BOOLEAN</code></a> <em class="replaceable"><code>new-value</code></em>.
- </dd></dl></div><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><a class="link" href="#input-char" title="13.2.1. Input Characters"><code class="classname">SYS::INPUT-CHARACTER</code></a> is <span class="strong"><strong>not</strong></span> a subtype of
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_character.html" target="_top"><code class="classname">CHARACTER</code></a>.</p></div>
- <!--#ifdef KEYBOARD-->
- <div class="variablelist"><dl><dt><span class="term"><span class="plat-dep">Platform Dependent: <span class="plat-dep"><a class="ulink" href="http://www.UNIX-systems.org/online.html" target="_top"><span class="strong"><strong>UNIX</strong></span></a>, <a class="ulink" href="http://winehq.com/" target="_top"><span class="platform">Win32</span></a> platforms only.</span></span></span></dt><dd>The system itself uses this <a class="link" href="#input-char" title="13.2.1. Input Characters"><code class="classname">SYS::INPUT-CHARACTER</code></a> type only to
- mention special keys and <span class="keycap"><strong>Control</strong></span>/<span class="keycap"><strong>Alternate</strong></span>/<span class="keycap"><strong>Shift</strong></span> key status on return from
- <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_read-char.html" target="_top"><code class="function">READ-CHAR</code></a> <a href="impnotes.html#with-kbd" class="olink"><code class="varname">EXT:*KEYBOARD-INPUT*</code></a>)</code>.</dd></dl></div>
- <!--#endif-->
- </div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="graph-char"></a>13.3. Graphic Characters
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_13-1-4-1.html" target="_top">[CLHS-13.1.4.1]</a></h2></div></div></div><p>The <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/glo_g.html#graphic" target="_top">graphic</a> characters are those <a class="ulink" href="http://www.unicode.org/" target="_top"><span class="platform">UNICODE</span></a> characters which are
- defined by the <a class="ulink" href="http://www.unicode.org/" target="_top"><span class="platform">UNICODE</span></a> standard, excluding the ranges
- <span class="keycode">U0000</span> … <span class="keycode">U001F</span> and
- <span class="keycode">U007F</span> … <span class="keycode">U009F</span>.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="alpha-char"></a>13.4. Alphabetic Characters
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_13-1-4-2.html" target="_top">[CLHS-13.1.4.2]</a></h2></div></div></div><p>The alphabetic characters are those <a class="ulink" href="http://www.unicode.org/" target="_top"><span class="platform">UNICODE</span></a> characters which are
- defined as letters by the <a class="ulink" href="http://www.unicode.org/" target="_top"><span class="platform">UNICODE</span></a> standard, e.g., the <a class="ulink" href="http://en.wikipedia.org/wiki/ASCII" target="_top"><span class="platform">ASCII</span></a> characters
- </p><div class="literallayout"><p> ABCDEFGHIJKLMNOPQRSTUVWXYZ<br />
- abcdefghijklmnopqrstuvwxyz<br />
- </p></div><p>
- and the international alphabetic characters from the character set:
- </p><div class="literallayout"><p> ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜßáíóúñѪºãõØøÀÃÕ etc.<br />
- </p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="char-case"></a>13.5. Characters With Case
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_13-1-4-3.html" target="_top">[CLHS-13.1.4.3]</a></h2></div></div></div><div class="toc"><dl><dt><span class="section"><a href="#char-invertcase">13.5.1. Function <code class="function">EXT:CHAR-INVERTCASE</code></a></span></dt><dt><span class="section"><a href="#char-ext">13.5.2. Case of Implementation-Defined Characters
- [CLHS-13.1.4.3.4]</a></span></dt></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="char-invertcase"></a>13.5.1. Function <a class="link" href="#char-invertcase" title="13.5.1. Function EXT:CHAR-INVERTCASE"><code class="function">EXT:CHAR-INVERTCASE</code></a></h3></div></div></div><p><code class="code">(<a class="link" href="#char-invertcase" title="13.5.1. Function EXT:CHAR-INVERTCASE"><code class="function">EXT:CHAR-INVERTCASE</code></a> <em class="replaceable"><code>char</code></em>)</code> returns the corresponding
- character in the other case for <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/acc_charcm_schar.html" target="_top"><code class="function">CHAR</code></a>, i.e., <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_char-upca_har-downcase.html" target="_top"><code class="function">CHAR-UPCASE</code></a> for a
- lowercase character and <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_char-upca_har-downcase.html" target="_top"><code class="function">CHAR-DOWNCASE</code></a> for an uppercase character; for
- a character that does not have a case attribute, the argument is returned.
- See also <a class="link" href="#string-invertcase" title="16.1.3. Functions EXT:STRING-INVERTCASE and EXT:NSTRING-INVERTCASE"><code class="function">EXT:STRING-INVERTCASE</code></a> and <a class="link" href="#string-invertcase" title="16.1.3. Functions EXT:STRING-INVERTCASE and EXT:NSTRING-INVERTCASE"><code class="function">EXT:NSTRING-INVERTCASE</code></a>.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="char-ext"></a>13.5.2. Case of Implementation-Defined Characters
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_13-1-4-3-4.html" target="_top">[CLHS-13.1.4.3.4]</a></h3></div></div></div><p>The characters with case are those <a class="ulink" href="http://www.unicode.org/" target="_top"><span class="platform">UNICODE</span></a> characters <em class="replaceable"><code>c</code></em>, for
- which the upper case mapping <em class="replaceable"><code>uc</code></em> and the lower case mapping <em class="replaceable"><code>lc</code></em>
- have the following properties:
- </p><div class="itemizedlist"><ul type="disc"><li><em class="replaceable"><code>uc</code></em> and <em class="replaceable"><code>lc</code></em> are different</li><li><em class="replaceable"><code>c</code></em> is one of <em class="replaceable"><code>uc</code></em> and <em class="replaceable"><code>lc</code></em></li><li>the upper case mapping of <em class="replaceable"><code>uc</code></em> and of <em class="replaceable"><code>lc</code></em>
- is <em class="replaceable"><code>uc</code></em></li><li>the lower case mapping of <em class="replaceable"><code>uc</code></em> and of <em class="replaceable"><code>lc</code></em>
- is <em class="replaceable"><code>lc</code></em></li></ul></div><p>The titlecase property of <a class="ulink" href="http://www.unicode.org/" target="_top"><span class="platform">UNICODE</span></a> characters has no equivalent in
- <a class="ulink" href="http://www.lisp.org" target="_top"><span class="command"><strong>Common Lisp</strong></span></a>.</p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="num-char"></a>13.6. Numeric Characters
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_13-1-4-4.html" target="_top">[CLHS-13.1.4.4]</a></h2></div></div></div><p>The numeric characters are those <a class="ulink" href="http://www.unicode.org/" target="_top"><span class="platform">UNICODE</span></a> characters which are
- defined as digits by the <a class="ulink" href="http://www.unicode.org/" target="_top"><span class="platform">UNICODE</span></a> standard.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="char-ord"></a>13.7. Ordering of Characters
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_13-1-6.html" target="_top">[CLHS-13.1.6]</a></h2></div></div></div><p>The characters are ordered according to their <a class="ulink" href="http://www.unicode.org/" target="_top"><span class="platform">UNICODE</span></a> code.</p><p>The functions <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_chareqcm__ar-not-lessp.html" target="_top"><code class="function">CHAR-EQUAL</code></a> <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_chareqcm__ar-not-lessp.html" target="_top"><code class="function">CHAR-NOT-EQUAL</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_chareqcm__ar-not-lessp.html" target="_top"><code class="function">CHAR-LESSP</code></a>,
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_chareqcm__ar-not-lessp.html" target="_top"><code class="function">CHAR-GREATERP</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_chareqcm__ar-not-lessp.html" target="_top"><code class="function">CHAR-NOT-GREATERP</code></a>, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_chareqcm__ar-not-lessp.html" target="_top"><code class="function">CHAR-NOT-LESSP</code></a> ignore bits and
- font attributes of their arguments.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="clhs-newline"></a>13.8. Treatment of Newline during Input and Output
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_13-1-8.html" target="_top">[CLHS-13.1.8]</a></h2></div></div></div><p>Newlines are written according to the stream's <a class="link" href="#encoding" title="31.5. Encodings"><code class="classname">EXT:ENCODING</code></a>, see the
- function <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_stream-external-format.html" target="_top"><code class="function">STREAM-EXTERNAL-FORMAT</code></a> and the description of <a class="link" href="#encoding" title="31.5. Encodings"><code class="classname">EXT:ENCODING</code></a>s,
- in particular, <a class="link" href="#newline" title="31.5.3. Line Terminators">line terminator</a>s.
- The default behavior is as follows:</p>
- <!--#if defined(WIN32) || (defined(UNIX) && (O_BINARY != 0))-->
- <div class="variablelist"><dl><dt><span class="term"><span class="plat-dep">Platform Dependent: <span class="plat-dep"><a class="ulink" href="http://winehq.com/" target="_top"><span class="platform">Win32</span></a> platform only.</span></span></span></dt><dd>When writing to a file, <span class="keysym">#\Newline</span> is converted to
- <span class="keycode">CR</span>/<span class="keycode">LF</span>. (This is the usual convention on <a class="ulink" href="http://www.freedos.org/" target="_top"><span class="platform">DOS</span></a>.)
- For example, <span class="keysym">#\Return</span>+<span class="keysym">#\Newline</span> is written as <span class="keycode">CR</span>/<span class="keycode">CR</span>/<span class="keycode">LF</span>.
- </dd></dl></div>
- <!--#endif-->
- <p>When reading from a file, <span class="keycode">CR</span>/<span class="keycode">LF</span> is converted to <span class="keysym">#\Newline</span>
- (the usual convention on <a class="ulink" href="http://www.freedos.org/" target="_top"><span class="platform">DOS</span></a>), and <span class="keycode">CR</span> not followed by <span class="keycode">LF</span> is
- converted to <span class="keysym">#\Newline</span> as well (the usual conversion on MacOS, also used
- by some programs on <a class="ulink" href="http://winehq.com/" target="_top"><span class="platform">Win32</span></a>).
- If you do not want this, i.e., if you really want to distinguish
- <span class="keycode">LF</span>, <span class="keycode">CR</span> and <span class="keycode">CR</span>/<span class="keycode">LF</span>, you have to resort to
- binary input (function <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_read-byte.html" target="_top"><code class="function">READ-BYTE</code></a>).</p><p><b>Justification. </b><a class="ulink" href="http://www.unicode.org/reports/tr13/tr13-9.html" target="_top">Unicode
- Newline Guidelines</a> say: “<span class="quote">Even if you know which
- characters represents NLF on your particular platform, on input and in
- interpretation, treat CR, LF, CRLF, and NEL the same. Only on output do
- you need to distinguish between them.</span>”</p><p><b>Rationale. </b>In <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a>, <span class="keysym">#\Newline</span> is identical to <span class="keysym">#\Linefeed</span>
- (which is specifically permitted by [<span class="citation"><a class="link" href="#ansi-cl" title="ANSI Common Lisp standard X3.226-1994 - Information Technology - Programming Language - Common Lisp">ANSI CL standard</a></span>] in section
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_13-1-7.html" target="_top">13.1.7 “<span class="quote">Character
- Names</span>”</a>).
- Consider a file containing exactly this string:
- <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_concatenate.html" target="_top"><code class="function">CONCATENATE</code></a> '<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/any_string.html" target="_top"><code class="literal">STRING</code></a> "foo" (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_string.html" target="_top"><code class="function">STRING</code></a> <span class="keysym">#\Linefeed</span>)
- "bar" (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_string.html" target="_top"><code class="function">STRING</code></a> <span class="keysym">#\Return</span>) (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_string.html" target="_top"><code class="function">STRING</code></a> <span class="keysym">#\Linefeed</span>))</code>
- Suppose we open it with <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_open.html" target="_top"><code class="function">OPEN</code></a> "foo" <a class="link" href="#extfmt"><code class="constant">:EXTERNAL-FORMAT</code></a> <code class="constant">:DOS</code>)</code>.
- What should <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_read-line.html" target="_top"><code class="function">READ-LINE</code></a> return?
- Right now, it returns <span class="returnvalue">"foo"</span>
- (the second <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_read-line.html" target="_top"><code class="function">READ-LINE</code></a> returns <span class="returnvalue">"bar"</span>
- and reaches <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/glo_e.html#end_of_file" target="_top"><code class="literal">end-of-stream</code></a>).
- If our i/o were “<span class="quote">faithful</span>”, <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_read-line.html" target="_top"><code class="function">READ-LINE</code></a> would have
- returned the string <code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_concatenate.html" target="_top"><code class="function">CONCATENATE</code></a> '<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/any_string.html" target="_top"><code class="literal">STRING</code></a> "foo" (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_string.html" target="_top"><code class="function">STRING</code></a>
- <span class="keysym">#\Linefeed</span>) "bar")</code>, i.e., a string with an embedded <span class="keysym">#\Newline</span>
- between <span class="returnvalue">"foo"</span>
- and <span class="returnvalue">"bar"</span> (because a single <span class="keysym">#\Linefeed</span> is not a
- <span class="keysym">#\Newline</span> in the specified <a class="link" href="#extfmt"><code class="constant">:EXTERNAL-FORMAT</code></a>, it will not make <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_read-line.html" target="_top"><code class="function">READ-LINE</code></a> return,
- but it <span class="strong"><strong>is</strong></span> a <a class="ulink" href="http://clisp.cons.org" target="_top"><span class="command"><strong>CLISP</strong></span></a> <span class="keysym">#\Newline</span>!) Even though the specification for
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_read-line.html" target="_top"><code class="function">READ-LINE</code></a> does not explicitly forbids newlines inside the returned
- string, such behavior would be quite surprising, to say the least.
- Moreover, this line (with an embedded <span class="keysym">#\Newline</span>) would be written as two
- lines (when writing to a <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_stream.html" target="_top"><code class="classname">STREAM</code></a> with <a class="link" href="#extfmt"><code class="constant">:EXTERNAL-FORMAT</code></a> of <code class="constant">:DOS</code>), because
- the embedded <span class="keysym">#\Newline</span> would be written as <span class="keycode">CR</span>+<span class="keycode">LF</span>.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="char-int"></a>13.9. Character Encodings
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_13-1-9.html" target="_top">[CLHS-13.1.9]</a></h2></div></div></div><p>The integer returned by <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_char-int.html" target="_top"><code class="function">CHAR-INT</code></a> is the same as the character's
- code (<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_char-code.html" target="_top"><code class="function">CHAR-CODE</code></a>).</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="script-ext"></a>13.10. Documentation
- of Implementation-Defined Scripts
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_13-1-10.html" target="_top">[CLHS-13.1.10]</a></h2></div></div></div><p>See <a class="xref" href="#encoding" title="31.5. Encodings">Section 31.5, “Encodings”</a>.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="char-dict"></a>13.11. The Characters Dictionary
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/sec_the_chara_s_dictionary.html" target="_top">[CLHS-13.2]</a></h2></div></div></div><div class="toc"><dl><dt><span class="section"><a href="#char-code">13.11.1. Function <code class="function">CHAR-CODE</code></a></span></dt><dt><span class="section"><a href="#base-char">13.11.2. Type <code class="classname">BASE-CHAR</code></a></span></dt><dt><span class="section"><a href="#char-width">13.11.3. Function <code class="function">EXT:CHAR-WIDTH</code></a></span></dt></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="char-code"></a>13.11.1. Function <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_char-code.html" target="_top"><code class="function">CHAR-CODE</code></a></h3></div></div></div><p><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_char-code.html" target="_top"><code class="function">CHAR-CODE</code></a> takes values from <code class="literal">0</code> (inclusive) to
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_char-code-limit.html" target="_top"><code class="constant">CHAR-CODE-LIMIT</code></a> (exclusive), i.e., the implementation
- supports exactly <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_char-code-limit.html" target="_top"><code class="constant">CHAR-CODE-LIMIT</code></a> characters.</p><div class="table"><a id="char-code-limit-table"></a><p class="title"><b>Table 13.5. Number of characters</b></p><div class="table-contents"><table summary="Number of characters" border="1"><colgroup><col /><col /><col /></colgroup><thead><tr><th align="center">binaries built</th><th align="center"><span class="strong"><strong>without</strong></span> <a class="ulink" href="http://www.unicode.org/" target="_top"><span class="platform">UNICODE</span></a> support</th><th align="center"><span class="strong"><strong>with</strong></span> <a class="ulink" href="http://www.unicode.org/" target="_top"><span class="platform">UNICODE</span></a> support</th></tr></thead><tbody><tr><td align="center"><a class="ulink" href="http://www.lisp.org/HyperSpec/Body/convar_char-code-limit.html" target="_top"><code class="constant">CHAR-CODE-LIMIT</code></a></td><td align="center">2<sup>8</sup> = 256</td><td align="center">17 * 2<sup>16</sup> = 1114112</td></tr></tbody></table></div></div><br class="table-break" /></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="base-char"></a>13.11.2. Type <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_base-char.html" target="_top"><code class="classname">BASE-CHAR</code></a></h3></div></div></div><p>The types <code class="classname">EXT:STRING-CHAR</code> and
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/typ_base-char.html" target="_top"><code class="classname">BASE-CHAR</code></a> are equivalent to <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/syscla_character.html" target="_top"><code class="classname">CHARACTER</code></a>.
- <code class="classname">EXT:STRING-CHAR</code> used to be available as
- <code class="classname">STRING-CHAR</code> prior to removal from [<span class="citation"><a class="link" href="#ansi-cl" title="ANSI Common Lisp standard X3.226-1994 - Information Technology - Programming Language - Common Lisp">ANSI CL standard</a></span>] by
- <a class="ulink" href="http://www.lisp.org/HyperSpec/Issues/iss026.html" target="_top">CHARACTER-PROPOSAL:2</a>.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="char-width"></a>13.11.3. Function <a class="link" href="#char-width" title="13.11.3. Function EXT:CHAR-WIDTH"><code class="function">EXT:CHAR-WIDTH</code></a></h3></div></div></div><p><code class="code">(<a class="link" href="#char-width" title="13.11.3. Function EXT:CHAR-WIDTH"><code class="function">EXT:CHAR-WIDTH</code></a> <em class="replaceable"><code>char</code></em>)</code> returns the number of screen
- columns occupied by <em class="replaceable"><code>char</code></em>.
- This is 0 for non-spacing characters
- (such as control characters and many combining characters),
- 2 for double-width East Asian characters,
- and 1 for all other characters.
- See also function <a class="link" href="#string-width" title="16.1.2. Function EXT:STRING-WIDTH"><code class="function">EXT:STRING-WIDTH</code></a>.
- </p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="char-platform-dep"></a>13.12. Platform-Dependent Characters</h2></div></div></div><p>The characters that are not <a class="ulink" href="http://www.lisp.org/HyperSpec/Body/glo_g.html#graphic" target="_top">graphic</a> chars and the space character
- have names:</p>
- <!--#ifdef WIN32_CHARNAMES-->
- <div class="table"><a id="dos-win32-chars-table"></a><p class="title"><b>Table 13.6. Additional characters (<span class="plat-dep">Platform Dependent: <span class="plat-dep"><a class="ulink" href="http://winehq.com/" target="_top"><span class="platform">Win32</span></a> platform only.</span></span>)</b></p><div class="table-contents"><table summary="Additional characters (Win32 platform only.)" border="1"><colgroup><col /><col /></colgroup><thead><tr><th align="center">code</th><th align="center">char</th></tr></thead><tbody><tr><td align="center"><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> #x00)</code></td><td align="center"><span class="keysym">#\Null</span></td></tr><tr><td align="center"><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> #x07)</code></td><td align="center"><span class="keysym">#\Bell</span></td></tr><tr><td align="center"><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> #x08)</code></td><td align="center"><span class="keysym">#\Backspace</span></td></tr><tr><td align="center"><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> #x09)</code></td><td align="center"><span class="keysym">#\Tab</span></td></tr><tr><td align="center"><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> #x0A)</code></td><td align="center"><span class="keysym">#\Newline</span></td><td align="center"><span class="keysym">#\Linefeed</span></td></tr><tr><td align="center"><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> #x0B)</code></td><td align="center"><span class="keysym">#\Code11</span></td><td class="auto-generated"> </td></tr><tr><td align="center"><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> #x0C)</code></td><td align="center"><span class="keysym">#\Page</span></td><td class="auto-generated"> </td></tr><tr><td align="center"><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> #x0D)</code></td><td align="center"><span class="keysym">#\Return</span></td><td class="auto-generated"> </td></tr><tr><td align="center"><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> #x1A)</code></td><td align="center"><span class="keysym">#\Code26</span></td><td class="auto-generated"> </td></tr><tr><td align="center"><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> #x1B)</code></td><td align="center"><span class="keysym">#\Escape</span></td><td align="center"><span class="keysym">#\Esc</span></td></tr><tr><td align="center"><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> #x20)</code></td><td align="center"><span class="keysym">#\Space</span></td><td class="auto-generated"> </td></tr><tr><td align="center"><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> #x7F)</code></td><td align="center"><span class="keysym">#\Rubout</span></td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" />
- <!--#endif-->
- <!--#ifdef UNIX_CHARNAMES-->
- <div class="table"><a id="unix-chars-table"></a><p class="title"><b>Table 13.7. Additional characters (<span class="plat-dep">Platform Dependent: <span class="plat-dep"><a class="ulink" href="http://www.UNIX-systems.org/online.html" target="_top"><span class="strong"><strong>UNIX</strong></span></a> platform only.</span></span>)</b></p><div class="table-contents"><table summary="Additional characters (UNIX platform only.)" border="1"><colgroup><col /><col /></colgroup><thead><tr><th align="center">code</th><th align="center">char</th></tr></thead><tbody><tr><td align="center"><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> #x00)</code></td><td align="center"><span class="keysym">#\Null</span></td><td align="center"><span class="keysym">#\Nul</span></td></tr><tr><td align="center"><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> #x01)</code></td><td align="center"><span class="keysym">#\Soh</span></td><td class="auto-generated"> </td></tr><tr><td align="center"><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> #x02)</code></td><td align="center"><span class="keysym">#\Stx</span></td><td class="auto-generated"> </td></tr><tr><td align="center"><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> #x03)</code></td><td align="center"><span class="keysym">#\Etx</span></td><td class="auto-generated"> </td></tr><tr><td align="center"><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> #x04)</code></td><td align="center"><span class="keysym">#\Eot</span></td><td class="auto-generated"> </td></tr><tr><td align="center"><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> #x05)</code></td><td align="center"><span class="keysym">#\Enq</span></td><td class="auto-generated"> </td></tr><tr><td align="center"><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> #x06)</code></td><td align="center"><span class="keysym">#\Ack</span></td><td class="auto-generated"> </td></tr><tr><td align="center"><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> #x07)</code></td><td align="center"><span class="keysym">#\Bell</span></td><td align="center"><span class="keysym">#\Bel</span></td></tr><tr><td align="center"><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> #x08)</code></td><td align="center"><span class="keysym">#\Backspace</span></td><td align="center"><span class="keysym">#\Bs</span></td></tr><tr><td align="center"><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> #x09)</code></td><td align="center"><span class="keysym">#\Tab</span></td><td align="center"><span class="keysym">#\Ht</span></td></tr><tr><td align="center"><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> #x0A)</code></td><td align="center"><span class="keysym">#\Newline</span></td><td align="center"><span class="keysym">#\Nl</span></td><td align="center"><span class="keysym">#\Linefeed</span></td></tr><tr><td align="center"><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> #x0B)</code></td><td align="center"><span class="keysym">#\Vt</span></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="center"><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> #x0C)</code></td><td align="center"><span class="keysym">#\Page</span></td><td align="center"><span class="keysym">#\Np</span></td><td class="auto-generated"> </td></tr><tr><td align="center"><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> #x0D)</code></td><td align="center"><span class="keysym">#\Return</span></td><td align="center"><span class="keysym">#\Cr</span></td><td class="auto-generated"> </td></tr><tr><td align="center"><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> #x0E)</code></td><td align="center"><span class="keysym">#\So</span></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="center"><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> #x0F)</code></td><td align="center"><span class="keysym">#\Si</span></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="center"><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> #x10)</code></td><td align="center"><span class="keysym">#\Dle</span></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="center"><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> #x11)</code></td><td align="center"><span class="keysym">#\Dc1</span></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="center"><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> #x12)</code></td><td align="center"><span class="keysym">#\Dc2</span></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="center"><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> #x13)</code></td><td align="center"><span class="keysym">#\Dc3</span></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="center"><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> #x14)</code></td><td align="center"><span class="keysym">#\Dc4</span></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="center"><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> #x15)</code></td><td align="center"><span class="keysym">#\Nak</span></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="center"><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> #x16)</code></td><td align="center"><span class="keysym">#\Syn</span></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="center"><code class="code">(<a class="ulink" href="http://www.lisp.org/HyperSpec/Body/fun_code-char.html" target="_top"><code class="function">CODE-CHAR</code></a> #x17)</code></td><td align="center"><span class="keysym">#\Etb</span></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td