Difference between revisions of "SubL"
m |
DavidWhitten (talk | contribs) |
||
| (93 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
| − | + | [http://web.archive.org/web/20060325065433/http://www.opencyc.org/web/20060325065433im_/http://www.cyc.com/cycdoc/img/opencyc-logo-small.gif|OpenCyc.org Homepage] | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| + | SubL Reference | ||
| + | Last Update: 03/28/2002 ''Copyright© 1996-2002 Cycorp. All rights reserved. | ||
| + | |||
| + | How to Use this Document | ||
| + | |||
| + | SubL is a computer language built by members of Cycorp. SubL was written to support the Cyc® application, allowing it to run both under Lisp environments and as a C application generated by a SubL-to-C translator. This document describes the primitive functions of SubL. | ||
| + | |||
| + | Due to the close similarities between SubL and Common Lisp, the [[#Table-of-Contents|Table of Contents]] and structure of this document intentionally mirror that of | ||
| + | |||
<blockquote>'''"Common Lisp: The Language"''',<br /> | <blockquote>'''"Common Lisp: The Language"''',<br /> | ||
2nd Edition,<br /> | 2nd Edition,<br /> | ||
Guy L. Steele Jr<br /> | Guy L. Steele Jr<br /> | ||
</blockquote> | </blockquote> | ||
| − | making it easy to compare and contrast the two languages. For the most part, this document focuses only on the differences between SubL and Common Lisp. | + | making it easy to compare and contrast the two languages. For the most part, this document focuses only on the differences between SubL and Common Lisp. |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| + | An online version of [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/clm.html "Common Lisp: The Language"] can be found at | ||
| − | - | + | <blockquote> |
| + | http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/clm.html | ||
| + | '''<code>http://www.supelec.fr/docs/cltl/clm/clm.html</code>''' | ||
| + | or an index to all Common Lisp functions was found at | ||
| + | http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/index.html | ||
| + | original link (non-working in 2019) was: '''<code>http://www.supelec.fr/docs/cltl/clm/index.html</code>''' | ||
| + | </blockquote> | ||
| − | + | Each section of this document contains a link labelled '''"CLtL2 Reference"''' to the corresponding sections of the above online Common Lisp reference. The reader is strongly encouraged to consult that reference in parallel with this document. | |
| − | |||
| − | |||
| − | |||
| − | |||
= 1 : Introduction = | = 1 : Introduction = | ||
| Line 59: | Line 48: | ||
Here is a table of all the procedural constructs in SubL and the Common Lisp analog: | Here is a table of all the procedural constructs in SubL and the Common Lisp analog: | ||
| − | + | {| border=1 | |
| − | + | | '''SubL Procedural Construct''' || '''Common Lisp Equivalent''' | |
| − | '''Common Lisp | + | |+ |
| + | | <code>PROGN</code> || <code>progn</code> | ||
| + | |+ | ||
| + | | <code>PIF</code> || <code>if</code> | ||
| + | |+ | ||
| + | | <code>PWHEN</code> || <code>when</code> | ||
| + | |+ | ||
| + | | <code>PUNLESS</code> || <code>unless</code> | ||
| + | |+ | ||
| + | | <code>PCOND</code> || <code>cond</code> | ||
| + | |+ | ||
| + | | <code>PCASE</code> || <code>case</code> | ||
| + | |+ | ||
| + | | <code>CSETQ</code> || <code>setq</code> | ||
| + | |+ | ||
| + | | <code>CSETF</code> || <code>setf</code> | ||
| + | |+ | ||
| + | | <code>CINC</code> || <code>incf</code> | ||
| + | |+ | ||
| + | | <code>CDEC</code> || <code>decf</code> | ||
| + | |+ | ||
| + | | <code>CPUSH</code> || <code>push</code> | ||
| + | |+ | ||
| + | | <code>CPUSHNEW</code> || <code>pushnew</code> | ||
| + | |+ | ||
| + | | <code>CPOP</code> || <code>pop</code> | ||
| + | |+ | ||
| + | | <code>CLET</code> || <code>let*</code> | ||
| + | |+ | ||
| + | | <code>CMULTIPLE-VALUE-BIND</code> || <code>multiple-value-bind</code> | ||
| + | |+ | ||
| + | | <code>CDO</code> || <code>do*</code> | ||
| + | |+ | ||
| + | | <code>CDOLIST</code> || <code>dolist</code> | ||
| + | |+ | ||
| + | | <code>CSOME</code> || '' '' | ||
| + | |+ | ||
| + | | <code>CDOTIMES</code> || <code>dotimes</code> | ||
| + | |+ | ||
| + | | <code>CDOHASH</code> || '' '' | ||
| + | |+ | ||
| + | | <code>CCATCH</code> || <code>catch</code> | ||
| + | |+ | ||
| + | | <code>CUNWIND-PROTECT</code> || <code>unwind-protect</code> | ||
| + | |+ | ||
| + | | <code>RET</code> || <code>return-from</code> | ||
| + | |} | ||
| + | A functional construct in SubL is one which returns a value. Here is a table of all the functional constructs in SubL and the Common Lisp analog: | ||
| + | {| border=1 | ||
| + | ! '''SubL Functional Construct''' || '''Common Lisp Equvalent''' | ||
| + | |+ | ||
| + | | <code>CAND</code> || <code>and</code> | ||
| + | |+ | ||
| + | | <code>COR</code> || <code>or</code> | ||
| + | |+ | ||
| + | | <code>CNOT</code> || <code>not</code> | ||
| + | |+ | ||
| + | | <code>FIF</code> || <code>if</code> | ||
| + | |+ | ||
| + | | <code>FWHEN</code> || <code>when</code> | ||
| + | |+ | ||
| + | | <code>FUNLESS</code> || <code>unless</code> | ||
| + | |} | ||
| + | The body of a function or macro definition is considered an implicit progn, and so all forms in the body should be procedural. A function call can be used as a procedural construct. In this case, the returned value is simply ignored. | ||
----- | ----- | ||
| − | + | = 2 : Data Types = | |
| − | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node15.html CLtL2 Reference] | |
| − | + | SubL has a flat type heirarchy. Each type is described in more detail in the sections about the methods for that particular type. | |
| − | + | SubL supports these built-in Common Lisp datatypes: | |
| − | + | {| border=1 | |
| − | + | | Numbers: | |
| − | + | | fixnum | |
| − | + | |- | |
| − | + | | | |
| − | + | | float | |
| − | + | |- | |
| − | + | | Symbols: | |
| − | + | | symbol | |
| − | + | |- | |
| − | + | | Lists: | |
| − | + | | cons | |
| − | + | |- | |
| − | + | | Arrays: | |
| − | + | | vector | |
| − | + | |- | |
| − | + | | Characters: | |
| − | + | | character | |
| − | + | |- | |
| − | + | | Strings: | |
| − | + | | string | |
| − | + | |- | |
| − | + | | Hashtables: | |
| − | + | | eq hashtable | |
| − | + | |- | |
| − | + | | | |
| − | + | | eql hashtable | |
| − | + | |- | |
| − | + | | | |
| − | + | | equal hashtable | |
| − | + | |- | |
| + | | | ||
| + | | equalp hashtable | ||
| + | |- | ||
| + | | Streams: | ||
| + | | stream | ||
| + | |- | ||
| + | | Functions: | ||
| + | | function | ||
| + | |} | ||
| − | + | SubL does '''not''' support these Common Lisp datatypes: | |
| + | {| border=1 | ||
| + | | Multi-dimensional arrays | ||
| + | |+ | ||
| + | | Packages | ||
| + | |+ | ||
| + | | Pathnames | ||
| + | |+ | ||
| + | | Random-states | ||
| + | |+ | ||
| + | | Lambda-Expressions or Closures | ||
| + | |} | ||
| − | + | SubL has only special-case support for these datatypes: | |
| − | + | {| border=1 | |
| − | + | | Readtables: | |
| + | |+ | ||
| + | | SubL only supports a single internal readtable | ||
| + | |} | ||
| − | <code> | + | New data types can be introduced via [[#FN-DEF-DEFSTRUCT|<code>DEFSTRUCT</code>]]. |
| − | + | = 3 : Scope and Extent = | |
| − | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node43.html CLtL2 Reference] | |
| − | <code> | + | Special variables in SubL are all (and only) those variables defined globally with [[#FN-DEF-DEFVAR|<code>DEFVAR</code>]] or [[#FN-DEF-DEFPARAMETER|<code>DEFPARAMETER</code>]]. In addition, the name of each special variable must begin and end with an asterisk character : <code>'*'</code>. |
| − | + | Special variables have indefinite scope and dynamic extent. All other variables have lexical scope and dynamic extent | |
| − | + | Variables are introduced via: | |
| − | <code> | + | ; '''Function call''' |
| + | : A new set of variables for the formal parameters of the function are introduced. The extent of the function arguments is the duration of the function invocation. | ||
| + | ; '''[[#FN-DEF-CLET|<code>CLET</code>]], [[#FN-DEF-CMULTIPLE-VALUE-BIND|<code>CMULTIPLE-VALUE-BIND</code>]], [[#FN-DEF-CDESTRUCTURING-BIND|<code>CDESTRUCTURING-BIND</code>]]''' | ||
| + | : These constructs explicitly introduce and initialize new local variables. The extent of these variables is until exit from the constuct. | ||
| + | ; '''[[#FN-DEF-CDO|<code>CDO</code>]], [[#FN-DEF-CDOLIST|<code>CDOLIST</code>]], [[#FN-DEF-CSOME|<code>CSOME</code>]], [[#FN-DEF-CDOTIMES|<code>CDOTIMES</code>]], [[#FN-DEF-CDOHASH|<code>CDOHASH</code>]]''' | ||
| + | : These iteration constructs explicitly introduce and update local variables which represent the state of the iteration. The extent of these variables is until exit from the iteration construct. | ||
| − | + | When a local variable is introduced with the same name as a local variable which is already within the current scope and extent, the new variable shadows the outer variable. | |
| − | + | The initialization of a local variable is considered to occur within the scope of the new local variable. Consequently, a variable which is shadowing an outer variable cannot be initialized in terms of the outer value. For example, this is not allowed : | |
| − | <code> | + | <blockquote><pre>(define foo (x) |
| + | (clet ((x (+ x 1))) | ||
| + | (print x)) | ||
| + | (ret nil))</pre></blockquote> | ||
| + | However, if the variable is a special variable, the [[#FN-DEF-CLET|<code>CLET</code>]] is actually introducing a binding for the special variable, not introducing a new local variable. In this case, the initialization of the binding can be a function of its current value for the variable being bound. For example, this is allowed: | ||
| − | < | + | <blockquote><pre>(defvar *some-var* 1) |
| − | <code> | + | (define foo (x) |
| + | (clet ((*some-var* (+ *some-var* x))) | ||
| + | (print *some-var*)) | ||
| + | (ret nil))</pre></blockquote> | ||
| + | The construct [[#FN-DEF-RET|<code>RET</code>]] must be used for a function or macro definition to return its intended result. | ||
| − | |||
| − | + | ----- | |
| − | + | = 4 : Type Specifiers = | |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node44.html CLtL2 Reference] | ||
| − | + | ; SubL does not support type specifiers. | |
| − | + | = 5 : Program Structure = | |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node55.html CLtL2 Reference] | ||
| − | + | : Program structure in SubL mirrors that of Common Lisp almost exactly. All objects except lists and symbols are self-evaluating. This includes numbers, characters, strings, vectors and hashtables. | |
| + | :In addition : | ||
| + | :* Keyword symbols are self-evaluating. | ||
| + | :* The symbols T and NIL are self-evaluating. | ||
| − | < | + | == 5.3.1 : Defining Named Functions == |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node66.html CLtL2 Reference]<br /> | ||
| − | <code> | + | ;macro <code>DEFINE : (name arglist &body body)</code> |
| + | : All functions in SubL must be named and therefore defined via the SubL construct [[#FN-DEF-DEFINE|<code>DEFINE</code>]]. See also the similar construct [[#FN-DEF-DEFPOLYMORPHIC|<code>DEFPOLYMORPHIC</code>]] which is used to define generic functions which switch off the type of the first argument. | ||
| − | + | : Argument lists for user-defined function can only be of this form: | |
| − | <code> | + | <blockquote><pre>( {var}* [&optional; {var | ( var [initform [supplied-var]] ) }*] )</pre></blockquote> |
| + | :: In short, SubL supports <code>&optional;</code> arguments for user-defined functions but does '''not''' support <code>&keyword;</code>, <code>&aux;</code> or <code>&rest;</code> arguments for user-defined functions. | ||
| − | + | == 5.3.2 : Declaring Global Variables and Named Constants == | |
| − | </ | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node67.html CLtL2 Reference]<br /> |
| − | |||
| − | < | + | ;macro <code>DEFVAR : (variable &optional initialization documentation)</code><br /> |
| − | + | ;macro <code>DEFPARAMETER : (variable initialization &optional documentation)</code> | |
| + | : [[#FN-DEF-DEFVAR|<code>DEFVAR</code>]] and [[#FN-DEF-DEFPARAMETER|<code>DEFPARAMETER</code>]] are the SubL constructs used to define global variables. The name of each variable must begin and end with an asterisk. | ||
| + | : SubL enforces an important distinction between these two constructs, which is described in greater detail under [[#FN-DEF-WRITE-IMAGE|<code>WRITE-IMAGE</code>]].<br /> | ||
| − | + | ;macro <code>DEFCONSTANT : (variable initialization &optional documentation)</code> | |
| − | <code> | + | : As with [[#FN-DEF-DEFVAR|<code>DEFVAR</code>]] and [[#FN-DEF-DEFPARAMETER|<code>DEFPARAMETER</code>]], the name of each named constant defined via [[#FN-DEF-DEFCONSTANT|<code>DEFCONSTANT</code>]] must begin and end with an asterisk. |
| − | + | = 6 : Predicates = | |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node69.html CLtL2 Reference] | ||
| − | + | == 6.1 : Logical Values == | |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node70.html CLtL2 Reference] | ||
| − | + | : The symbols NIL and T are used to represent the logical values "true" and "false" in SubL and behave exactly as they do in Common Lisp. | |
| − | + | == 6.2.2 : Specific Data Type Predicates == | |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node73.html CLtL2 Reference] | ||
| − | + | : For the most part, the following predicates which check for specific data types behave exactly as they do in Common Lisp. | |
| − | <code> | + | {| border=1 |
| + | |+ | ||
| + | | function <code>NULL : (x)</code> || Same as Common Lisp | ||
| + | |+ | ||
| + | | function <code>SYMBOLP : (x)</code> || Same as Common Lisp | ||
| + | |+ | ||
| + | | function <code>ATOM : (x)</code> || Same as Common Lisp | ||
| + | |+ | ||
| + | || function <code>CONSP : (x)</code> || Same as Common Lisp | ||
| + | |+ | ||
| + | | function <code>LISTP : (x)</code> || Same as Common Lisp | ||
| + | |+ | ||
| + | | function <code>NUMBERP : (x)</code> || Same as Common Lisp | ||
| + | |+ | ||
| + | |function <code>INTEGERP : (x)</code> || Same as Common Lisp | ||
| + | |+ | ||
| + | | function <code>FLOATP : (x)</code> || Same as Common Lisp | ||
| + | |+ | ||
| + | | function <code>CHARACTERP : (x)</code> || Same as Common Lisp | ||
| + | |+ | ||
| + | | function <code>STRINGP : (x)</code> || Same as Common Lisp | ||
| + | |+ | ||
| + | | function <code>VECTORP : (x)</code> || Same as Common Lisp | ||
| + | |+ | ||
| + | | function <code>FUNCTIONP : (x)</code>|| Follows the CLtL2 implementation | ||
| + | |+ | ||
| + | || function <code>FUNCTION-SPEC-P : (x)</code> || Returns T IFF x is an object suitable for FUNCALL | ||
| + | |} | ||
| − | <code>if</code> | + | In SubL, [[#FN-DEF-FUNCTIONP|<code>FUNCTIONP</code>]] only returns T if its argument is a function object. The function [[#FN-DEF-FUNCTION-SPEC-P|<code>FUNCTION-SPEC-P</code>]] returns T if its argument is suitable for [[#FN-DEF-FUNCALL|<code>FUNCALL</code>]] or [[#FN-DEF-APPLY|<code>APPLY</code>]]. |
| − | + | == 6.3 : Equality Predicates == | |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node74.html CLtL2 Reference] | ||
| − | <code> | + | The SubL equality predicates behave exactly like their Common Lisp counterparts. |
| + | ; function <code>EQ : (x y)</code> | ||
| − | <code> | + | ; function <code>EQL : (x y)</code> |
| − | <code> | + | ; function <code>EQUAL : (x y)</code> |
| − | |||
| − | |||
| + | ; function <code>EQUALP : (x y)</code> | ||
| − | + | == 6.4 : Logical Operators == | |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node75.html CLtL2 Reference] | ||
| − | + | : SubL logical operations '''only''' return T or NIL. Otherwise, they behave like their Common Lisp counterparts. | |
| − | + | ; macro <code>CNOT : (x)</code> | |
| − | + | ; macro <code>CAND : (&rest args)</code> | |
| − | SubL | + | ; macro <code>COR : (&rest args)</code> |
| + | |||
| + | = 7 : Control Structure = | ||
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node76.html CLtL2 Reference] | ||
| + | |||
| + | === 7.1.1 : Reference === | ||
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node78.html CLtL2 Reference] | ||
| + | |||
| + | These SubL constructs behave exactly like their Common Lisp counterparts. | ||
| + | |||
| + | ; function <code>QUOTE : (data)</code> | ||
| + | |||
| + | ; macro <code>FUNCTION : (fspec)</code> | ||
| + | |||
| + | ; function <code>SYMBOL-VALUE : (x)</code> | ||
| + | |||
| + | ; function <code>SYMBOL-FUNCTION : (x)</code> | ||
| + | |||
| + | ; function <code>BOUNDP : (x)</code> | ||
| + | |||
| + | ; function <code>FBOUNDP : (x)</code> | ||
| + | |||
| + | === 7.1.2 : Assignment === | ||
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node79.html CLtL2 Reference]<br /> | ||
| − | < | + | ; macro <code>CSETQ : (var value &rest var-val-pairs)</code> |
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | : Since [[#FN-DEF-CSETQ|<code>CSETQ</code>]] is procedural in SubL, it does not return a value. | |
| − | + | : Otherwise, it behaves just like <code>setq</code> in Common Lisp. | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | | | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | These SubL functions for setting and unsetting symbol properties behave like their Common Lisp counterparts.<br /> | |
| − | + | ;function <code>SET : (symbol value)</code><br /> | |
| − | |||
| − | + | ;function <code>MAKUNBOUND : (symbol)</code><br /> | |
| − | |||
| − | |||
| − | + | ;function <code>FMAKUNBOUND : (symbol)</code> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | === 7.2 : Generalized Variables === | |
| − | </ | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node80.html CLtL2 Reference]<br /> |
| − | < | + | |
| − | + | ;macro <code>CSETF : (place val)</code> | |
| − | + | : [[#FN-DEF-CSETF|<code>CSETF</code>]] is a more restricted version of <code>setf</code> in Common Lisp. First, since it is procedural, like [[#FN-DEF-CSETQ|<code>CSETQ</code>]] it does not return a value. Second, there is a much more restricted set of place-specifiers which are allowable. | |
| − | |||
| − | |||
| − | </ | ||
| − | |||
| − | < | + | Here is a complete table of the allowable [[#FN-DEF-CSETF|<code>CSETF</code>]] forms, and their equivalent SubL expansions: |
| − | | | + | {| width="100%" style="font-size:90%; background:transparent;" border=1 |
| − | | | + | | '''CSETF form''' || '''Equivalent SubL expansion''' |
| + | |+ | ||
| + | | <code>'''('''CSETF variable value''')'''</code> || <code>'''('''CSETQ variable value''')'''</code> | ||
| + | |+ | ||
| + | | <code>'''('''CSETF (AREF vector n''')''' value )</code> || <code>(SET-AREF</code> vector n value''')''' | ||
| + | |+ | ||
| + | | <code>(CSETF</code> ([[#FN-DEF-NTH|<code>NTH</code>]] n list''')''' value''')''' || <code>(SET-NTH</code> n list value''')''' | ||
| + | |+ | ||
| + | | <code>(CSETF</code> ([[#FN-DEF-CAR|<code>CAR</code>]] cons''')''' value''')''' || <code>(RPLACA</code> cons value''')''' | ||
| + | |+ | ||
| + | | <code>(CSETF</code> ([[#FN-DEF-CDR|<code>CDR</code>]] cons''')''' value''')''' || <code>(RPLACD</code> cons value''')''' | ||
| + | |+ | ||
| + | | <code>(CSETF</code> ([[#FN-DEF-GET|<code>GET</code>]] symbol indicator''')''' value''')''' || <code>(PUT</code> symbol indicator value''')''' | ||
| + | |+ | ||
| + | | <code>(CSETF</code> ([[#FN-DEF-GETHASH|<code>GETHASH</code>]] key hashtable''')''' value''')''' || <code>(SETHASH</code> key hashtable value''')''' | ||
| + | |+ | ||
| + | | <code>(CSETF</code> ([[#FN-DEF-SYMBOL-VALUE|<code>SYMBOL-VALUE</code>]] symbol''')''' value''')''' || <code>(SET</code> symbol value''')''' | ||
| + | |+ | ||
| + | | <code>(CSETF</code> (defstruct-slot object''')''' value''')''' || <code>(set-defstruct-slot object value)</code> | ||
|} | |} | ||
| − | + | In the above table, '''defstruct-slot''' refers to any structure slot accessor function which got defined via defstruct, and '''set-defstruct-slot''' refers to the corresponding setter function for the given accessor. | |
| − | |||
| − | + | === 7.3 : Function Invocation === | |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node81.html CLtL2 Reference] | ||
| − | + | These functions behave like their Common Lisp counterparts.<br /> | |
| − | + | ;function <code>APPLY : (function argument &rest arguments)</code><br /> | |
| − | + | ;function <code>FUNCALL : (function &rest args)</code> | |
| − | + | The first argument to both [[#FN-DEF-APPLY|<code>APPLY</code>]] and [[#FN-DEF-FUNCALL|<code>FUNCALL</code>]] must satisfy [[#FN-DEF-FUNCTION-SPEC-P|<code>FUNCTION-SPEC-P</code>]]. | |
| − | + | == 7.4 : Simple Sequencing == | |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node82.html CLtL2 Reference]<br /> | ||
| − | ; | + | ; macro <code>PROGN : (&body body)</code> |
| − | + | : In SubL, [[#FN-DEF-PROGN|<code>PROGN</code>]] is procedural and therefore does not return a value. Since it is intended to be essentially procedural in Common Lisp as well, the same name is used even though they have slightly different semantics. | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | == 7.5 : Establishing New Variable Bindings == | |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node83.html CLtL2 Reference]<br /> | ||
| − | The | + | ;macro <code>CLET : (bindings &body body)</code> |
| + | : The SubL construct [[#FN-DEF-CLET|<code>CLET</code>]] can be used to introduce new local variables or bind special variables. The variables are initialized in order just like <code>LET*</code> in Common Lisp. Since it is procedural, it does not return a value. | ||
| − | < | + | SubL has no counterpart to Common Lisp's <code>LET</code> construct.<br /> |
| − | |||
| − | |||
| − | |||
| − | |||
| − | < | + | ;macro <code>CPROGV : (special-vars bindings &body body)</code> |
| + | : [[#FN-DEF-CPROGV|<code>CPROGV</code>]] is procedural and therefore does not return a value. Otherwise, it is equivalent to <code>progv</code> in Common Lisp. | ||
| − | + | == 7.6 : Conditionals == | |
| − | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node84.html CLtL2 Reference]<br /> | |
| − | |||
| − | |||
| − | |||
| + | ;macro <code>PIF : (condition action else-action)</code><br /> | ||
| − | + | ;macro <code>PWHEN : (condition &body body)</code><br /> | |
| − | + | ;macro <code>PUNLESS : (condition &body body)</code> | |
| − | [ | + | [[#FN-DEF-PIF|<code>PIF</code>]], [[#FN-DEF-PWHEN|<code>PWHEN</code>]] and [[#FN-DEF-PUNLESS|<code>PUNLESS</code>]] are the SubL procedural variants of <code>if</code>, <code>when</code> and <code>unless</code> from Common Lisp. For each, the condition argument must be a functional construct. Also, [[#FN-DEF-PIF|<code>PIF</code>]] takes exactly three arguments, making the action and else-actions identical in form.<br /> |
| − | + | ;macro <code>FIF : (condition true-value false-value)</code><br /> | |
| + | ;macro <code>FWHEN : (condition true-value)</code><br /> | ||
| − | - | + | ;macro <code>FUNLESS : (condition false-value)</code> |
| − | + | [[#FN-DEF-FIF|<code>FIF</code>]], [[#FN-DEF-FWHEN|<code>FWHEN</code>]] and [[#FN-DEF-FUNLESS|<code>FUNLESS</code>]] are the SubL functional variants of <code>if</code>, <code>when</code> and <code>unless</code> from Common Lisp.<br /> | |
| − | + | ;macro <code>PCOND : (&rest clauses)</code><br /> | |
| − | + | ;macro <code>PCASE : (test-object &body clauses)</code> | |
| − | + | : [[#FN-DEF-PCOND|<code>PCOND</code>]] and [[#FN-DEF-PCASE|<code>PCASE</code>]] are the SubL procedural equivalents of <code>cond</code> and <code>case</code> from Common Lisp. | |
| − | |||
| − | [ | + | == 7.7 : Blocks and Exits == |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node85.html CLtL2 Reference]<br /> | ||
| − | + | ;macro <code>RET : (expression)</code><br /> | |
| + | : SubL functions must always return a value, since C functions must return values and all SubL functions must translate into C (Java). | ||
| + | : [[#FN-DEF-RET|<code>RET</code>]] is used to return a value from a function or macro definition. All functions and macro definitions behave as if an implicit | ||
| + | : '''(ret nil)''' | ||
| + | : appears at the very end of each function. | ||
| − | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/ | + | == 7.8.2 : General Iteration == |
| − | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node88.html CLtL2 Reference]<br /> | |
| − | + | ||
| + | ;macro <code>CDO : (vars endtest &body body)</code><br /> | ||
| + | : cdo is procedural. It binds its variables in sequence, as with CommonLisp do* | ||
| + | |||
| + | == 7.8.3 : Simple Iteration Constructs == | ||
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node89.html CLtL2 Reference]<br /> | ||
| − | + | ;macro <code>CDOLIST : ((var listform) &body body)</code><br /> | |
| − | + | ;macro <code>CSOME : ((var list endvar) &body body)</code><br /> | |
| − | < | + | ;macro <code>CDOTIMES : ((var integer) &body body)</code><br /> |
| − | |||
| − | + | ;macro <code>CDOHASH : ((key val table) &body body)</code> | |
| − | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/ | + | == 7.8.4 : Mapping == |
| − | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node90.html CLtL2 Reference]<br /> | |
| − | |||
| − | |||
| − | |||
| − | + | ;function <code>MAPCAR : (function list &rest more-lists)</code><br /> | |
| − | + | ;function <code>MAPLIST : (function list &rest more-lists)</code><br /> | |
| − | |||
| − | |||
| − | + | ;function <code>MAPC : (function list &rest more-lists)</code><br /> | |
| + | ;function <code>MAPL : (function list &rest more-lists)</code><br /> | ||
| − | - | + | ;function <code>MAPCAN : (function list &rest more-lists)</code><br /> |
| − | + | ;function <code>MAPCON : (function list &rest more-lists)</code> | |
| − | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/ | + | == 7.10.1 : Constructs for Handling Multiple Values == |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node94.html CLtL2 Reference]<br /> | ||
| − | + | ;function <code>VALUES : (value &rest more-values)</code><br /> | |
| + | : values returns its args such that they can be bound in a dynamically enclosing multiple-value-bind. The first value is returned as well, since all SubL functions must return a value.<br /> | ||
| − | + | ;variable <code>*MULTIPLE-VALUES-LIMIT*</code><br /> | |
| − | + | ;macro <code>MULTIPLE-VALUE-LIST : (form)</code><br /> | |
| − | + | ;macro <code>CMULTIPLE-VALUE-BIND : (vars value &body body)</code> | |
| − | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/ | + | == 7.10.2 : Rules Governing the Passing of Multiple Values == |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node95.html CLtL2 Reference] | ||
| − | + | In SubL, multiple values are governed the same way that they are in Common Lisp, except that if ANY of the return statements in your function are (values ...) then all of them must be. | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | == 7.11 : Dynamic Non-Local Exits == | |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node96.html CLtL2 Reference]<br /> | ||
| − | + | ;macro <code>CCATCH : (tag ans-var &body body)</code><br /> | |
| + | : ccatch is procedural, and so does not return values.<br /> | ||
| − | + | ;macro <code>CUNWIND-PROTECT : (protected-form &body body)</code><br /> | |
| − | + | ;function <code>THROW : (tag result)</code> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | == | + | = 8 : Macros = |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node97.html CLtL2 Reference] | ||
| − | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/ | + | == 8.1 : Macro Definition == |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node98.html CLtL2 Reference]<br /> | ||
| − | + | ;macro <code>DEFMACRO : (name pattern &body body)</code> | |
| − | + | : SubL Macros are expanded at translation-time. Full Common Lisp macro support is available. However, the macro-expander must use [[#FN-DEF-RET|<code>RET</code>]] to return the expansion. | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | [[| | ||
| + | == 8.3 : Destructuring == | ||
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node100.html CLtL2 Reference]<br /> | ||
| − | - | + | ;macro <code>CDESTRUCTURING-BIND : (pattern datum &body body)</code> |
| − | = | + | == 8.5 : Environments == |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node102.html CLtL2 Reference]<br /> | ||
| − | + | ;function <code>VARIABLE-INFORMATION : (variable)</code><br /> | |
| − | + | ;function <code>FUNCTION-INFORMATION : (function)</code> | |
| − | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/ | + | = 9 : Declarations = |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node103.html CLtL2 Reference] | ||
| − | + | == 9.1 : Declaration Syntax == | |
| − | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node104.html CLtL2 Reference]<br /> | |
| − | [ | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;function <code>DECLARE : (&rest ignore)</code><br /> | |
| − | + | ;function <code>PROCLAIM : (declaration-specifier)</code><br /> | |
| − | |||
| − | |||
| − | + | ;macro <code>DECLAIM : (&rest declaration-specifiers)</code> | |
| − | + | == 9.2 : Declaration Specifiers == | |
| − | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node105.html CLtL2 Reference]<br /> | |
| − | [ | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;function <code>IGNORE : (&rest values)</code> | |
| + | : The [[#FN-DEF-IGNORE|<code>IGNORE</code>]] function can be used to indicate that a particular variable's value is not used. | ||
| − | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/ | + | = 10 : Symbols = |
| − | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node107.html CLtL2 Reference]<br /> | |
| − | |||
| − | + | ;function <code>SYMBOLP : (x)</code> | |
| − | + | == 10.1 : The Property List == | |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node108.html CLtL2 Reference]<br /> | ||
| − | + | ;function <code>GET : (symbol indicator &optional default)</code><br /> | |
| + | ;function <code>PUT : (symbol indicator new-value)</code><br /> | ||
| − | + | ;function <code>REMPROP : (symbol indicator)</code><br /> | |
| − | <code>( | + | ;function <code>SYMBOL-PLIST : (symbol)</code> |
| − | + | == 10.2 : The Print Name == | |
| − | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node109.html CLtL2 Reference]<br /> | |
| − | <code>( | + | ;function <code>SYMBOL-NAME : (symbol)</code><br /> |
| + | : Returns the string which is the name of SYMBOL. When called on a keyword, it returns the ":" prefix as part of the name | ||
| − | + | == 10.3 : Creating Symbols == | |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node110.html CLtL2 Reference]<br /> | ||
| − | <code>( | + | ;function <code>MAKE-SYMBOL : (print-name)</code><br /> |
| − | <code>( | + | ;function <code>GENSYM : (&optional x)</code><br /> |
| + | : GENSYM returns new, interned symbols, which are combinations of a string prefix and a numeric suffix. It guarantees that the new symbol was not previously interned.<br /> | ||
| + | : If the argument X is a number, the gensym counter (used to generate the suffix) is set to X before the new symbol is generated.<br /> | ||
| + | : if the argument X is a string, the gensym prefix is set to X before the new symbol is generated.<br /> | ||
| + | : The initial gensym counter value is 1 and the initial gensym prefix is 'G'.<br /> | ||
| − | <code>( | + | ;function <code>GENTEMP : (&optional (prefix "T"))</code><br /> |
| − | <code>( | + | ;function <code>KEYWORDP : (x)</code><br /> |
| + | : In SubL, which does not have packages, keywords are any symbol whose name begins with ":" | ||
| − | + | = 11 : Packages = | |
| − | <code>( | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node111.html CLtL2 Reference]<br /> |
| + | <br /> | ||
| + | ;macro <code>IN-PACKAGE : (name)</code><br /> | ||
| + | <br /> | ||
| + | ;function <code>INTERN : (string)</code><br /> | ||
| + | :Finds and returns a symbol whose name is STRING. INTERN will create the symbol if it does not exist. Unlike Common LISP intern, the SubL version does not allow an argument to specify the package, since SubL does not support packages.<br /> | ||
| + | <br /> | ||
| + | ;function <code>FIND-SYMBOL : (string)</code><br /> | ||
| + | :Finds and returns a symbol whose name is STRING. Unlike Common LISP FIND-SYMBOL, the SubL version does not allow an argument to specify the package, since SubL does not support packages. | ||
| − | + | = 12 : Numbers = | |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node121.html CLtL2 Reference] | ||
| − | < | + | SubL only supports fixnums and floats. Fixnums have at least 28 bits of precision.<br /> |
| − | <code>( | + | ;function <code>NUMBERP : (x)</code><br /> |
| − | <code>( | + | ;function <code>FIXNUMP : (x)</code><br /> |
| − | <code>( | + | ;function <code>INTEGERP : (x)</code><br /> |
| − | <code>( | + | ;function <code>FLOATP : (x)</code> |
| − | < | + | == 12.2 : Predicates on Numbers == |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node123.html CLtL2 Reference]<br /> | ||
| − | + | ;function <code>ZEROP : (x)</code><br /> | |
| − | + | ;function <code>PLUSP : (x)</code><br /> | |
| − | + | ;function <code>MINUSP : (x)</code><br /> | |
| − | + | ;function <code>ODDP : (x)</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;function <code>EVENP : (x)</code> | |
| − | == | + | == 12.3 : Comparisons on Numbers == |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node124.html CLtL2 Reference]<br /> | ||
| − | + | ;function <code>= : (num1 num2)</code><br /> | |
| − | |||
| − | |||
| − | + | ;function <code>/= : (num1 num2)</code><br /> | |
| − | + | ;function <code>< : (num1 num2)</code><br /> | |
| − | + | ;function <code>> : (num1 num2)</code><br /> | |
| − | |||
| − | |||
| − | + | ;function <code><= : (num1 num2)</code><br /> | |
| − | + | ;function <code>>= : (num1 num2)</code> | |
| − | |||
| − | |||
| − | + | The above numeric comparison functions take exactly 2 arguments, unlike their Common Lisp counterparts which take variable numbers of arguments.<br /> | |
| − | + | ;function <code>MAX : (num &rest numbers)</code><br /> | |
| − | + | ;function <code>MIN : (num &rest numbers)</code> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | [ | + | == 12.4 : Arithmetic Operations == |
| − | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node125.html CLtL2 Reference]<br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;function <code>+ : (&rest numbers)</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;function <code>- : (num &rest numbers)</code><br /> | |
| − | + | ;function <code>* : (&rest numbers)</code><br /> | |
| − | + | ;function <code>/ : (num &rest numbers)</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | + | ;function <code>INT/ : (num1 num2)</code><br /> | |
| − | < | + | ;macro <code>CINC : (place &optional (delta 1))</code><br /> |
| − | |||
| − | + | ;macro <code>CDEC : (place &optional (delta 1))</code> | |
| − | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/ | + | == 12.5 : Irrational and Transcendental Functions == |
| − | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node126.html CLtL2 Reference] | |
| − | |||
| − | |||
| − | == | + | SubL does not currently support any irrational, transcendental or trigonometric functions. |
| + | |||
| + | == 12.6 : Type Conversions and Component Extractions on Numbers == | ||
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node130.html CLtL2 Reference]<br /> | ||
| − | + | ;function <code>FLOAT : (x)</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;function <code>FLOOR : (x)</code><br /> | |
| − | + | ;function <code>CEILING : (x)</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;function <code>TRUNCATE : (x)</code><br /> | |
| − | + | ;function <code>ROUND : (x)</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;function <code>MOD : (number divisor)</code><br /> | |
| − | + | ;function <code>REM : (number divisor)</code><br /> | |
| − | + | ;function <code>SCALE-FLOAT : (float integer)</code><br /> | |
| − | + | ;function <code>INTEGER-DECODE-FLOAT : (float)</code> | |
| − | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/ | + | == 12.7 : Logical Operations on Numbers == |
| − | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node131.html CLtL2 Reference] | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| + | SubL does not currently support any logical operations on numbers. | ||
| − | + | == 12.8 : Byte Manipulation Functions == | |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node132.html CLtL2 Reference]<br /> | ||
| − | + | ;macro <code>BYTE : (size position)</code><br /> | |
| − | + | ;function <code>LDB : (bytespec integer)</code><br /> | |
| − | + | ;function <code>DPB : (newbyte bytespec integer)</code> | |
| − | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/ | + | == 12.9 : Random Numbers == |
| − | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node133.html CLtL2 Reference]<br /> | |
| − | |||
| − | + | ;variable <code>*RAND-MAX*</code><br /> | |
| + | : *rand-max* is the largest fixnum that the function random can accept.<br /> | ||
| − | + | ;function <code>SEED-RANDOM : (&optional (seed-fixnum (mod (get-internal-real-time) *rand-max*)))</code><br /> | |
| + | :If seed-fixnum is omitted to seed-random, the internal clock is used<br /> | ||
| + | :in an implementation specific manner.<br /> | ||
| − | + | ;function <code>RANDOM : (number)</code> | |
| − | + | : | |
| − | |||
| − | == | + | == 12.10 : Implementation Parameters == |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node134.html CLtL2 Reference]<br /> | ||
| − | + | ;variable <code>*MOST-POSITIVE-FIXNUM*</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| + | ;variable <code>*MOST-NEGATIVE-FIXNUM*</code> | ||
| − | + | = 13 : Characters = | |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node135.html CLtL2 Reference]<br /> | ||
| − | + | ;function <code>CHARACTERP : (x)</code> | |
| − | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/ | + | == 13.1 : Character Attributes == |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node136.html CLtL2 Reference] | ||
| + | |||
| + | SubL does not currently support any attributes for characters. A character exists for each ASCII character code between 0 and 255 inclusive. Thus, the SubL equivalent of Common Lisp's <code>CHAR-CODE-LIMIT</code> is 256. | ||
| − | == | + | == 13.2 : Predicates on Characters == |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node137.html CLtL2 Reference]<br /> | ||
| + | ;function <code>ALPHA-CHAR-P : (char)</code><br /> | ||
| − | + | ;function <code>UPPER-CASE-P : (char)</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;function <code>LOWER-CASE-P : (char)</code><br /> | |
| − | + | ;function <code>BOTH-CASE-P : (char)</code><br /> | |
| − | |||
| − | |||
| − | + | ;function <code>DIGIT-CHAR-P : (char)</code><br /> | |
| + | ;function <code>ALPHANUMERICP : (char)</code><br /> | ||
| − | + | ;function <code>CHAR= : (char1 char2)</code><br /> | |
| − | = | + | ;function <code>CHAR/= : (char1 char2)</code><br /> |
| − | + | ;function <code>CHAR< : (char1 char2)</code><br /> | |
| − | |||
| − | |||
| − | + | ;function <code>CHAR> : (char1 char2)</code><br /> | |
| − | + | ;function <code>CHAR<= : (char1 char2)</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | = | + | ;function <code>CHAR>= : (char1 char2)</code><br /> |
| − | + | ;function <code>CHAR-EQUAL : (char1 char2)</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | + | ;function <code>CHAR-NOT-EQUAL : (char1 char2)</code><br /> | |
| − | + | ;function <code>CHAR-LESSP : (char1 char2)</code><br /> | |
| − | + | ||
| − | + | ;function <code>CHAR-GREATERP : (char1 char2)</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| + | ;function <code>CHAR-NOT-GREATERP : (char1 char2)</code><br /> | ||
| − | -- | + | ;function <code>CHAR-NOT-LESSP : (char1 char2)</code> |
| − | = | + | == 13.3 : Character Construction and Selection == |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node138.html CLtL2 Reference]<br /> | ||
| − | + | ;function <code>CHAR-CODE : (char)</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| + | ;function <code>CODE-CHAR : (code)</code> | ||
| − | + | == 13.4 : Character Conversions == | |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node139.html CLtL2 Reference]<br /> | ||
| − | + | ;function <code>CHAR-DOWNCASE : (char)</code><br /> | |
| − | + | ;function <code>CHAR-UPCASE : (char)</code> | |
| − | + | = 14 : Sequences = | |
| − | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node141.html CLtL2 Reference]<br /> | |
| − | [ | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;function <code>SEQUENCEP : (x)</code> | |
| − | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/ | + | == 14.1 : Simple Sequence Functions == |
| − | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node142.html CLtL2 Reference]<br /> | |
| − | + | ;function <code>ELT : (sequence index)</code><br /> | |
| − | + | ||
| − | + | ;function <code>SUBSEQ : (sequence start &optional end)</code><br /> | |
| − | + | ||
| − | + | ;function <code>COPY-SEQ : (sequence)</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;function <code>LENGTH : (sequence)</code><br /> | |
| − | + | ;function <code>REVERSE : (sequence)</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;function <code>NREVERSE : (sequence)</code> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | == | + | == 14.2 : Concatenating, Mapping and Reducing Sequences == |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node143.html CLtL2 Reference]<br /> | ||
| − | + | ;function <code>CCONCATENATE : (seq &rest more-seqs)</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;function <code>CREDUCE : (function sequence &optional (start 0) end (init-value :none))</code> | |
| − | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/ | + | == 14.3 : Modifying Sequences == |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node144.html CLtL2 Reference]<br /> | ||
| − | + | ;function <code>FILL : (sequence item &optional (start 0) (end (length sequence)))</code><br /> | |
| − | + | ;function <code>REPLACE : (sequence1 sequence2 &optional (start1 0) end1 (start2 0) end2)</code><br /> | |
| − | + | ;function <code>REMOVE : (item sequence &optional (test #'eql) (key #'identity) (start 0) end count)</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;function <code>REMOVE-IF : (test sequence &optional (key #'identity) (start 0) end count)</code><br /> | |
| − | + | ;function <code>DELETE : (item sequence &optional (test #'eql) (key #'identity) (start 0) end count)</code><br /> | |
| − | + | ;function <code>DELETE-IF : (test sequence &optional (key #'identity) (start 0) end count)</code><br /> | |
| − | + | ;function <code>REMOVE-DUPLICATES : (sequence &optional (test #'eql) (key #'identity) (start 0) end)</code><br /> | |
| − | + | ;function <code>DELETE-DUPLICATES : (sequence &optional (test #'eql) (key #'identity) (start 0) end)</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;function <code>SUBSTITUTE : (new old sequence &optional (test #'eql) (key #'identity) (start 0) end count)</code><br /> | |
| + | |||
| + | ;function <code>SUBSTITUTE-IF : (new test sequence &optional (key #'identity) (start 0) end count)</code><br /> | ||
| + | |||
| + | ;function <code>NSUBSTITUTE : (new old sequence &optional (test #'eql) (key #'identity) (start 0) end count)</code><br /> | ||
| + | |||
| + | ;function <code>NSUBSTITUTE-IF : (new test sequence &optional (key #'identity) (start 0) end count)</code> | ||
| − | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/ | + | == 14.4 : Searching Sequences for Terms == |
| − | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node145.html CLtL2 Reference]<br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;function <code>FIND : (item seq &optional (test #'eql) (key #'identity) (start 0) end)</code><br /> | |
| − | + | ;function <code>FIND-IF : (test seq &optional (key #'identity) (start 0) end)</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| + | ;function <code>POSITION : (item seq &optional (test #'eql) (key #'identity) (start 0) end)</code><br /> | ||
| − | - | + | ;function <code>POSITION-IF : (test seq &optional (key #'identity) (start 0) end)</code><br /> |
| − | + | ;function <code>COUNT : (item seq &optional (test #'eql) (key #'identity) (start 0) end)</code><br /> | |
| − | + | ;function <code>COUNT-IF : (test seq &optional (key #'identity) (start 0) end)</code><br /> | |
| − | |||
| − | |||
| − | + | ;function <code>MISMATCH : (seq1 seq2 &optional (test #'eql) (key #'identity) (start1 0) end1 (start2 0) end2)</code> | |
| − | + | ;function <code>SEARCH : (seq1 seq2 &optional (test #'eql) (key #'identity) (start1 0) end1 (start2 0) end2)</code> | |
| − | + | == 14.5 : Sorting and Merging == | |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node146.html CLtL2 Reference]<br /> | ||
| − | + | ;function <code>SORT : (seq predicate &optional (key #'identity))</code><br /> | |
| − | + | ;function <code>STABLE-SORT : (seq predicate &optional (key #'identity))</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;function <code>CMERGE : (seq1 seq2 predicate &optional (key #'identity))</code> | |
| − | + | = 15 : Lists = | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node147.html CLtL2 Reference]<br /> | |
| − | + | ;function <code>LISTP : (x)</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| + | ;function <code>CONSP : (x)</code><br /> | ||
| − | + | ;function <code>ATOM : (x)</code> | |
| − | = | + | == 15.1 : Conses == |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node148.html CLtL2 Reference]<br /> | ||
| + | |||
| + | ;function <code>CAR : (cons)</code><br /> | ||
| + | |||
| + | ;function <code>CDR : (cons)</code><br /> | ||
| + | |||
| + | ;function <code>CAAR : (cons)</code><br /> | ||
| − | + | ;function <code>CADR : (cons)</code><br /> | |
| − | |||
| − | |||
| − | + | ;function <code>CDAR : (cons)</code><br /> | |
| − | + | ;function <code>CDDR : (cons)</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;function <code>CONS : (car cdr)</code><br /> | |
| − | + | ;function <code>TREE-EQUAL : (tree1 tree2 &optional (test #'eql))</code> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | == | + | == 15.2 : Lists == |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node149.html CLtL2 Reference]<br /> | ||
| − | + | ;function <code>ENDP : (object)</code><br /> | |
| − | + | ||
| − | + | ;function <code>LIST-LENGTH : (list)</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;function <code>NTH : (n list)</code><br /> | |
| − | + | ;function <code>FIRST : (list)</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;function <code>SECOND : (list)</code><br /> | |
| − | + | ;function <code>THIRD : (list)</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| + | ;function <code>FOURTH : (list)</code><br /> | ||
| − | + | ;function <code>FIFTH : (list)</code><br /> | |
| − | + | ;function <code>SIXTH : (list)</code><br /> | |
| − | + | ;function <code>SEVENTH : (list)</code><br /> | |
| − | <br /> | + | |
| − | + | ;function <code>EIGHTH : (list)</code><br /> | |
| − | <br /> | + | |
| − | + | ;function <code>NINTH : (list)</code><br /> | |
| − | <br /> | + | |
| − | + | ;function <code>TENTH : (list)</code><br /> | |
| + | |||
| + | ;function <code>REST : (list)</code><br /> | ||
| + | |||
| + | ;function <code>NTHCDR : (n list)</code><br /> | ||
| + | |||
| + | ;function <code>LAST : (list &optional (n 1))</code><br /> | ||
| + | |||
| + | ;function <code>LIST : (&rest objects)</code><br /> | ||
| − | + | ;function <code>LIST* : (arg &rest objects)</code><br /> | |
| − | + | ;function <code>MAKE-LIST : (size &optional initial-element)</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;function <code>APPEND : (&rest lists)</code><br /> | |
| − | + | ;function <code>COPY-LIST : (list)</code><br /> | |
| − | + | ||
| − | + | ;function <code>COPY-ALIST : (list)</code><br /> | |
| − | + | ||
| − | + | ;function <code>COPY-TREE : (tree)</code><br /> | |
| − | + | ||
| − | + | ;function <code>REVAPPEND : (list1 list2)</code><br /> | |
| − | + | ||
| − | + | ;function <code>NCONC : (&rest lists)</code><br /> | |
| − | + | ||
| − | + | ;function <code>NRECONC : (list1 list2)</code><br /> | |
| − | + | ||
| − | + | ; macro <code>CPUSH : (item place)</code><br /> | |
| − | + | ||
| − | + | ;macro <code>CPUSHNEW : (item place &optional (test '#'eql) (key '#'identity))</code><br /> | |
| − | + | ||
| − | + | ;macro <code>CPOP : (place)</code><br /> | |
| − | + | ||
| − | + | ;function <code>BUTLAST : (list &optional (n 1))</code><br /> | |
| − | + | ||
| − | + | ;function <code>NBUTLAST : (list &optional (n 1))</code><br /> | |
| − | + | ||
| − | + | ;function <code>LDIFF : (list sublist)</code> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
== 15.3 : Alteration of List Structure == | == 15.3 : Alteration of List Structure == | ||
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node150.html CLtL2 Reference]<br /> | ||
| − | + | ;function <code>RPLACA : (cons newcar)</code><br /> | |
| − | + | ||
| − | + | ;function <code>RPLACD : (cons newcdr)</code><br /> | |
| − | + | ||
| − | + | ;function <code>SET-NTH : (n list value)</code> | |
| − | |||
| − | |||
== 15.4 : Substitution of Expressions == | == 15.4 : Substitution of Expressions == | ||
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node151.html CLtL2 Reference]<br /> | ||
| − | + | ;function <code>SUBST : (new old tree &optional (test #'eql) (key #'identity))</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;function <code>SUBST-IF : (new test tree &optional (key #'identity))</code><br /> | |
| − | + | ;function <code>NSUBST : (new old tree &optional (test #'eql) (key #'identity))</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;function <code>NSUBST-IF : (new test tree &optional (key #'identity))</code><br /> | |
| − | + | ;function <code>SUBLIS : (alist tree &optional (test #'eql) (key #'identity))</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| + | ;function <code>NSUBLIS : (alist tree &optional (test #'eql) (key #'identity))</code> | ||
| − | + | == 15.5 : Using Lists as Sets == | |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node152.html CLtL2 Reference]<br /> | ||
| − | + | ;function <code>MEMBER : (item list &optional (test #'eql) (key #'identity))</code><br /> | |
| − | + | ;function <code>MEMBER-IF : (test list &optional (key #'identity))</code><br /> | |
| − | + | ;function <code>TAILP : (sublist list)</code><br /> | |
| − | + | ;function <code>ADJOIN : (item list &optional (test #'eql) (key #'identity))</code><br /> | |
| − | + | ;function <code>UNION : (list1 list2 &optional (test #'eql) (key #'identity))</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;function <code>NUNION : (list1 list2 &optional (test #'eql) (key #'identity))</code><br /> | |
| − | + | ;function <code>INTERSECTION : (list1 list2 &optional (test #'eql) (key #'identity))</code><br /> | |
| − | |||
| − | |||
| + | ;function <code>NINTERSECTION : (list1 list2 &optional (test #'eql) (key #'identity))</code> | ||
| − | - | + | ;function <code>SET-DIFFERENCE : (list1 list2 &optional (test #'eql) (key #'identity))</code> |
| − | + | ;function <code>NSET-DIFFERENCE : (list1 list2 &optional (test #'eql) (key #'identity))</code> | |
| − | + | ;function <code>SET-EXCLUSIVE-OR : (list1 list2 &optional (test #'eql) (key #'identity))</code> | |
| − | + | ;function <code>NSET-EXCLUSIVE-OR : (list1 list2 &optional (test #'eql) (key #'identity))</code> | |
| − | |||
| − | |||
| − | + | ;function <code>SUBSETP : (list1 list2 &optional (test #'eql) (key #'identity))</code> | |
| − | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/ | + | == 15.6 : Association Lists == |
| − | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node153.html CLtL2 Reference]<br /> | |
| − | |||
| − | |||
| − | |||
| − | + | ;function <code>ACONS : (key datum alist)</code><br /> | |
| − | + | ;function <code>PAIRLIS : (keys data &optional alist)</code><br /> | |
| − | <br /> | + | |
| − | + | ;function <code>ASSOC : (item alist &optional (test #'eql) (key #'identity))</code><br /> | |
| − | <br /> | + | |
| − | + | ;function <code>ASSOC-IF : (predicate alist)</code><br /> | |
| + | |||
| + | ;function <code>RASSOC : (item alist &optional (test #'eql) (key #'identity))</code><br /> | ||
| + | |||
| + | ;function <code>RASSOC-IF : (predicate alist)</code> | ||
----- | ----- | ||
| − | = | + | = 16 : Hash Tables = |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node154.html CLtL2 Reference] | ||
| + | |||
| + | == 16.1 : Hash Table Functions == | ||
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node155.html CLtL2 Reference]<br /> | ||
| + | |||
| + | ; function <code>MAKE-HASH-TABLE : (size &optional (test #'eql) (area default-cons-area))</code><br /> | ||
| + | |||
| + | ; function <code>HASH-TABLE-P : (x)</code><br /> | ||
| + | |||
| + | ; function <code>GETHASH : (key table &optional default)</code><br /> | ||
| + | |||
| + | ;function <code>SETHASH : (key table value)</code><br /> | ||
| − | + | ;function <code>REMHASH : (key table)</code><br /> | |
| − | |||
| − | |||
| − | + | ;function <code>MAPHASH : (function table)</code><br /> | |
| − | + | ;function <code>CLRHASH : (table)</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;function <code>HASH-TABLE-COUNT : (table)</code> | |
| − | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/ | + | == 16.2 : Primitive Hash Function == |
| − | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node156.html CLtL2 Reference]<br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ; function <code>SXHASH : (object)</code> | |
| − | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/ | + | = 17 : Arrays = |
| − | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node157.html CLtL2 Reference] | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| + | : SubL only supports one-dimensional arrays, which are called vectors.<br /> | ||
| − | + | function <code>VECTORP : (x)</code> | |
| − | = | + | == 17.1 : Vector Creation == |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node158.html CLtL2 Reference]<br /> | ||
| − | + | ;function <code>MAKE-VECTOR : (size &optional initial-element)</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;function <code>VECTOR : (&rest objects)</code> | |
| − | ( | ||
| − | |||
| − | + | == 17.2 : Vector Access == | |
| − | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node159.html CLtL2 Reference]<br /> | |
| − | ( | + | ; function <code>AREF : (vector index)</code><br /> |
| − | + | ;function <code>SET-AREF : (vector index value)</code> | |
| − | |||
| − | |||
| − | |||
| − | |||
| + | = 18 : Strings = | ||
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node164.html CLtL2 Reference]<br /> | ||
| − | + | ; function <code>STRINGP : (x)</code> | |
| − | = | + | == 18.1 : String Access == |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node165.html CLtL2 Reference]<br /> | ||
| − | + | ;function <code>CHAR : (string index)</code><br /> | |
| − | + | ;function <code>SET-CHAR : (string index value)</code> | |
| − | == | + | == 18.2 : String Comparison == |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node166.html CLtL2 Reference]<br /> | ||
| − | + | ;function <code>STRING= : (string1 string2 &optional (start1 0) end1 (start2 0) end2)</code> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;function <code>STRING-EQUAL : (string1 string2 &optional (start1 0) end1 (start2 0) end2)</code><br /> | |
| − | + | ;function <code>STRING< : (string1 string2 &optional (start1 0) end1 (start2 0) end2)</code><br /> | |
| − | + | ;function <code>STRING> : (string1 string2 &optional (start1 0) end1 (start2 0) end2)</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;function <code>STRING<= : (string1 string2 &optional (start1 0) end1 (start2 0) end2)</code><br /> | |
| − | < | + | ;function <code>STRING>= : (string1 string2 &optional (start1 0) end1 (start2 0) end2)</code><br /> |
| − | |||
| − | |||
| − | |||
| + | ;function <code>STRING/= : (string1 string2 &optional (start1 0) end1 (start2 0) end2)</code><br /> | ||
| − | - | + | ;function <code>STRING-LESSP : (string1 string2 &optional (start1 0) end1 (start2 0) end2)</code><br /> |
| − | + | ;function <code>STRING-GREATERP : (string1 string2 &optional (start1 0) end1 (start2 0) end2)</code><br /> | |
| − | + | ;function <code>STRING-NOT-GREATERP : (string1 string2 &optional (start1 0) end1 (start2 0) end2)</code><br /> | |
| − | |||
| − | |||
| − | + | ;function <code>STRING-NOT-LESSP : (string1 string2 &optional (start1 0) end1 (start2 0) end2)</code><br /> | |
| − | + | ;function <code>STRING-NOT-EQUAL : (string1 string2 &optional (start1 0) end1 (start2 0) end2)</code> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | == 18.3 : String Construction and Manipulation == | |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node167.html CLtL2 Reference]<br /> | ||
| − | + | ;function <code>MAKE-STRING : (size &optional (initial-element #\Space))</code><br /> | |
| − | + | ;function <code>STRING-TRIM : (char-list string)</code><br /> | |
| − | |||
| − | |||
| − | + | ;function <code>STRING-LEFT-TRIM : (char-list string)</code><br /> | |
| − | + | ;function <code>STRING-RIGHT-TRIM : (char-list string)</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| + | ;function <code>STRING-UPCASE : (string &optional (start 0) end)</code><br /> | ||
| − | - | + | ;function <code>STRING-DOWNCASE : (string &optional (start 0) end)</code><br /> |
| − | + | ;function <code>STRING-CAPITALIZE : (string &optional (start 0) end)</code><br /> | |
| − | + | ;function <code>NSTRING-UPCASE : (string &optional (start 0) end)</code><br /> | |
| − | + | ;function <code>NSTRING-DOWNCASE : (string &optional (start 0) end)</code><br /> | |
| − | + | ;function <code>NSTRING-CAPITALIZE : (string &optional (start 0) end)</code><br /> | |
| − | + | ;function <code>STRING : (x)</code> | |
| − | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/ | + | = 19 : Structures = |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node168.html CLtL2 Reference]<br /> | ||
| − | + | ;macro <code>DEFSTRUCT : ((name &rest options) &body slots)</code><br /> | |
| + | : Like Common Lisp defstruct except:<br /> | ||
| + | :: (1) slot initializations are not allowed. | ||
| + | :: (2) the only other options:<br /> | ||
| + | ::: (:conc-name whatever)<br /> | ||
| + | ::: (:print-function #'whatever) | ||
| + | ::: the default structure print function is<br /> | ||
| + | :::: default-struct-print-function : object stream depth | ||
| + | :: (3) The make constructor takes no arguments and only makes an empty structure. | ||
| + | :: (4) Reading of structures is not supported by the reader.<br /> | ||
| − | < | + | ; function <code>DEFAULT-STRUCT-PRINT-FUNCTION : (object stream depth)</code><br /> |
| + | ; macro <code>PRINTING-OBJECT : ((object stream) &body body)</code> | ||
| − | + | = 20 : The Evaluator = | |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node179.html CLtL2 Reference] | ||
| − | |||
| − | |||
| − | |||
| − | + | == 20.1 : Run-Time Evaluation of Forms == | |
| − | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node180.html CLtL2 Reference]<br /> | |
| − | |||
| − | |||
| − | + | ;function <code>EVAL : (form)</code><br /> | |
| − | + | ;function <code>CONSTANTP : (object &optional env)</code> | |
| − | + | : The Common Lisp functions <code>evalhook</code> and <code>applyhook</code> are not supported in SubL. | |
| − | < | + | == 20.2 : The Top-Level Loop == |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node181.html CLtL2 Reference]<br /> | ||
| + | ;variable <code>*</code><br /> | ||
| + | ;variable <code>**</code><br /> | ||
| + | ;variable <code>***</code> | ||
| + | : For convenience, the top-level readloop binds the following variables after each form is evaluated: | ||
| + | {|border=1 | ||
| + | |+ | ||
| + | | * || the last value returned | ||
| + | |+ | ||
| + | | ** || the previous value of * | ||
| + | |+ | ||
| + | | *** || the previous value of ** | ||
| + | |} | ||
| − | + | = 21 : Streams = | |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node182.html CLtL2 Reference]<br /> | ||
| − | + | ;function <code>STREAMP : (x)</code> | |
| − | |||
| − | |||
| − | + | == 21.1 : Standard Streams == | |
| − | </ | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node183.html CLtL2 Reference]<br /> |
| − | |||
| − | + | ;variable <code>*STANDARD-INPUT*</code><br /> | |
| − | + | ;variable <code>*STANDARD-OUTPUT*</code><br /> | |
| − | + | ;variable <code>*ERROR-OUTPUT*</code><br /> | |
| − | + | ;variable <code>*NULL-OUTPUT*</code><br /> | |
| + | : A bit-sink output stream. All output is ignored | ||
| − | + | The other standard streams supported by Common Lisp are not supported by SubL. | |
| − | |||
| − | |||
| − | == | + | == 21.2 : Creating new Streams == |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node184.html CLtL2 Reference]<br /> | ||
| − | + | ;function <code>OPEN-TCP-STREAM : (host port)</code> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | == 21.3 : Operations on Streams == | |
| − | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node185.html CLtL2 Reference]<br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;function <code>STREAMP : (x)</code><br /> | |
| − | + | ;function <code>INPUT-STREAM-P : (object)</code><br /> | |
| − | |||
| − | |||
| − | + | ;function <code>OUTPUT-STREAM-P : (object)</code><br /> | |
| − | + | ;function <code>CLOSE : (stream)</code> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | == | + | = 22 : Input/Output = |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node186.html CLtL2 Reference] | ||
| − | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/ | + | == 22.1 : Printed Representation of SubL Objects == |
| − | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node187.html CLtL2 Reference] | |
| − | |||
| − | == 22. | + | === 22.1.3 : Macro Characters === |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node190.html CLtL2 Reference] | ||
| − | + | The SubL reader supports the following macro characters, whose meaning is identical to their meaning in Common Lisp : | |
| − | |||
| − | |||
| − | |||
| + | {| | ||
| + | |'''Macro Character''' || '''Reader Action''' | ||
| + | |+ | ||
| + | |<code>(</code> || Begin reading a list. | ||
| + | |+ | ||
| + | |<code>)</code> || End reading a list or a vector. | ||
| + | |+ | ||
| + | |<code>'</code> || Read in a quoted expression. | ||
| + | |+ | ||
| + | |<code>;</code> || Read a comment until end-of-line. | ||
| + | |+ | ||
| + | |<code>"</code> || Begin or end reading a string. | ||
| + | |+ | ||
| + | |<code>`</code> || Read in a backquoted expression. | ||
| + | |} | ||
| − | - | + | In addition, the following comma-readers are supported inside of backquote : |
| − | + | <blockquote><pre>, | |
| + | ,@ | ||
| + | ,.</pre></blockquote> | ||
| − | + | Their behavior is identical to their Common Lisp counterparts. | |
| − | == | + | === 22.1.4 : Standard Dispatching Macro Character Syntax === |
| − | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/ | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node191.html CLtL2 Reference] |
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | '''<code>'#'</code>''' is the SubL standard dispatching macro character. The SubL reader supports the following dispatch macro character sequences, whose meanings are identical to their meanings in Common Lisp : | |
| − | + | {| | |
| + | | '''Dispatch Sequence''' || '''Reader Action''' | ||
| + | |+ | ||
| + | |<code><nowiki>#\(</nowiki></code> ||Read a character constant. | ||
| + | |+ | ||
| + | |<code><nowiki>#'</nowiki></code> ||Read a function constant. | ||
| + | |+ | ||
| + | |<code><nowiki>#(</nowiki></code> ||Begin reading a vector. | ||
| + | |+ | ||
| + | |<code><nowiki>#|</nowiki></code> ||Begin reading a comment section. | ||
| + | |+ | ||
| + | | <code><nowiki>|#</nowiki></code> || End reading a comment section. | ||
| + | |} | ||
| − | + | Additionally, SubL supports the dispatch sequence '''<code>#$</code>''' as follows : | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | <blockquote><code>#$foo</code> reads the Cyc constant whose name is <code>"foo"</code> | |
| + | </blockquote> | ||
| − | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/ | + | === 22.1.5 : The Readtable === |
| − | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node192.html CLtL2 Reference] | |
| − | + | ||
| − | + | SubL internally uses a readtable, but it is not visible to the programmer. | |
| − | + | ||
| − | + | === 22.1.6 : What the Print Function Produces === | |
| − | [ | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node193.html CLtL2 Reference]<br /> |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;variable <code>*PRINT-ESCAPE*</code> | |
| − | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/ | + | === 22.2.1 : Input from Character Streams === |
| − | <br /> | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node195.html CLtL2 Reference]<br /> |
| − | + | ; function <code>READ : (&optional (stream *standard-input*) (eof-error-p t) (eof-value :eof))</code><br /> | |
| + | : Returns FORM if read was successful.<br /> | ||
| + | : Returns the values NIL :ERROR if there was a reader error.<br /> | ||
| + | : Returns the values EOF-VALUE :ERROR if EOF-ERROR-P is nil and EOF occurs.<br /> | ||
| + | : Causes an error if EOF-ERROR-P is not nil and EOF occurs. | ||
| − | + | Differences from Common Lisp:<br /> | |
| + | <code>`Numbers are only read in decimal notation with no specified radix.\</code> | ||
| + | <code>No character modifiers: only standard chars plus specials like Space, Return etc.\</code> | ||
| + | <code>The || notation and \\ syntax for symbols are not supported.</code> | ||
| − | + | ;function<code>READ-LINE : (&optional (stream ''standard-input'') (eof-error-p t) (eof-value :eof))</code> | |
| − | |||
| − | |||
| + | ;function<code>READ-CHAR : (&optional (stream ''standard-input'') (eof-error-p t) (eof-value :eof))</code> | ||
| − | -- | + | ;function<code>UNREAD-CHAR : (char &optional (stream ''standard-input''))</code> |
| − | + | ;function<code>READ-FROM-STRING : (string &optional (eof-error-p t) (eof-value :eof) (start 0) end)`<br /></code> | |
| + | : Returns the values FORM NEW-START if read was successful.<br /> | ||
| + | : Returns the values NIL :ERROR if there was a reader error.<br /> | ||
| + | : Returns the values EOF-VALUE :ERROR if EOF-ERROR-P is nil and EOF occurs.<br /> | ||
| + | : Causes an error if EOF-ERROR-P is not nil and EOF occurs.<br /> | ||
| + | : Returns a second value which is an integer indicating the position in the string to<br /> | ||
| + | : start reading from again or :ERROR if there was some kind of reader error. | ||
| − | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/ | + | === 22.2.2 : Input from Binary Streams === |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node196.html CLtL2 Reference]<br /> | ||
| − | + | ;function <code>READ-BYTE : (stream &optional (eof-error-p t) (eof-value :eof))</code> | |
| − | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/ | + | === 22.3.1 : Output to Character Streams === |
| − | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node198.html CLtL2 Reference]<br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;function <code>WRITE : (object &optional (stream *standard-output*) (escape *print-escape*))</code><br /> | |
| − | + | ;function <code>PRIN1 : (object &optional (stream *standard-output*))</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| + | ;function <code>PRINT : (object &optional (stream *standard-output*))</code><br /> | ||
| − | - | + | ;function <code>PRINC : (object &optional (stream *standard-output*))</code><br /> |
| − | + | ;function <code>WRITE-TO-STRING : (object &optional (escape *print-escape*))</code><br /> | |
| − | + | ;function <code>PRIN1-TO-STRING : (object)</code><br /> | |
| − | + | ;function <code>PRINC-TO-STRING : (object)</code><br /> | |
| − | + | ;function <code>WRITE-CHAR : (char &optional (stream *standard-output*))</code><br /> | |
| − | + | ;function <code>WRITE-STRING : (string &optional (stream *standard-output*) (start 0) end)</code><br /> | |
| − | + | ;function <code>WRITE-LINE : (string &optional (stream *standard-output*) (start 0) end)</code><br /> | |
| − | + | ;function <code>TERPRI : (&optional (stream *standard-output*))</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;function <code>FORCE-OUTPUT : (&optional (stream *standard-output*))</code> | |
| − | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/ | + | === 22.3.2 : Output to Binary Streams === |
| − | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node199.html CLtL2 Reference]<br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;function <code>WRITE-BYTE : (integer stream)</code> | |
| − | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/ | + | === 22.3.3 : Formatted Output to Character Streams === |
| − | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node200.html CLtL2 Reference]<br /> | |
| − | |||
| + | ;function <code>FORMAT : (destination control-string &rest arguments)</code><br /> | ||
| + | : Format ARGUMENTS to the text stream DESTINATION according to the specifications in CONTROL-STRING. SubL format is more limited than the Common Lisp version: the only escapes allowed in the control string are: | ||
| + | : <nowiki> ~A </nowiki> | ||
| + | : <nowiki> ~a </nowiki> | ||
| + | : <nowiki> ~S </nowiki> | ||
| + | : <nowiki> ~s </nowiki> | ||
| + | : <nowiki> ~D (with width and pad parameters optional)</nowiki> | ||
| + | : <nowiki> ~d (with width and pad parameters optional) </nowiki> | ||
| + | : <nowiki>~C </nowiki> | ||
| + | : <nowiki> ~c </nowiki> | ||
| + | : <nowiki> ~G </nowiki> | ||
| + | : <nowiki> ~g </nowiki> | ||
| + | : <nowiki> ~% </nowiki> | ||
| + | : <nowiki> ~~ </nowiki> | ||
| − | + | = 23 : File System Interface = | |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node202.html CLtL2 Reference] | ||
| − | = | + | == 23.1 : File Names == |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node203.html CLtL2 Reference]<br /> | ||
| − | + | ;variable <code>*DEFAULT-PATHNAME-DEFAULTS*</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | ( | + | ;function <code>CONSTRUCT-FILENAME : (directory-list filename &optional extension relative?)</code> |
| − | |||
| − | + | Pathnames are just strings in SubL. Common Lisp pathname objects are not supported. | |
| − | |||
| − | + | == 23.2 : Opening and Closing Files == | |
| − | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node215.html CLtL2 Reference]<br /> | |
| − | + | ;function <code>OPEN-TEXT : (filename direction)</code><br /> | |
| − | + | :Attempts to open the file FILENAME. If successful, returns an 8-bit character text stream. If DIRECTION is :input, then input operations can be performed on the stream. If DIRECTION is output, then output is directed to the file FILENAME, overwriting any existing file. If DIRECTION is :append, then output is appended to the file. For either output case, a new file is created if no file named FILENAME already exists.<br /> | |
| − | + | ;function <code>OPEN-BINARY : (filename direction)</code><br /> | |
| − | <code> | + | :Attempts to open the file FILENAME. If successful, returns an 8-bit binary byte stream. If DIRECTION is :input, then input operations can be performed on the stream. If DIRECTION is output, then output is directed to the file FILENAME, overwriting any existing file. If DIRECTION is :append, then output is appended to the file. For either output case, a new file is created if no file named FILENAME already exists.<br /> |
| − | |||
| − | |||
| − | |||
| + | ;macro <code>WITH-TEXT-FILE : ((stream filestring direction) &body body)</code><br /> | ||
| + | :In the scope of a WITH-TEXT-FILE expression, the file FILESTRING is opened for character i/o and a stream to this file is created and bound to the variable STREAM. If DIRECTION is :input, then input operations can be performed on STREAM. If DIRECTION is :output, then output operations can be performed, overwriting any existing file. If DIRECTION is :append, then output is appended to an existing file.<br /> | ||
| − | ---- | + | ;macro <code>WITH-BINARY-FILE : ((stream filestring direction) &body body)</code><br /> |
| + | :In the scope of a WITH-BINARY-FILE expression, the file FILESTRING is opened for binary i/o and a stream to this file is created and bound to the variable STREAM. If DIRECTION is :input, then input operations can be performed on STREAM. If DIRECTION is :output, then output operations can be performed, overwriting any existing file. If DIRECTION is :append, then output is appended to an existing file. | ||
| − | = | + | == 23.3 : Renaming, Deleting and Other File Operations == |
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node216.html CLtL2 Reference]<br /> | ||
| + | |||
| + | ;function <code>RENAME-FILE : (filename new-name)</code><br /> | ||
| − | + | ;function <code>DELETE-FILE : (filename)</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;function <code>PROBE-FILE : (filename)</code><br /> | |
| − | + | ;function <code>APPEND-FILES : (filename-1 filename-2 &optional (mode :text))</code><br /> | |
| + | : Append filename-1 to filename-2<br /> | ||
| + | ;function <code>FILE-WRITE-DATE : (filename)</code><br /> | ||
| − | - | + | ;function <code>FILE-AUTHOR : (filename)</code><br /> |
| − | + | ;function <code>GET-FILE-POSITION : (stream)</code><br /> | |
| − | + | ;function <code>SET-FILE-POSITION : (stream n)</code><br /> | |
| − | + | ;function <code>FILE-LENGTH : (stream)</code> | |
| − | + | == 23.4 : Loading Files == | |
| − | [ | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node217.html CLtL2 Reference]<br /> |
| − | + | ||
| − | [ | + | ;function <code>LOAD : (filename)</code> |
| − | + | ||
| − | + | == 23.5 : Accessing Directories == | |
| − | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node218.html CLtL2 Reference]<br /> | |
| − | + | ||
| − | [ | + | ;function <code>DIRECTORY : (directory-name &optional include-directory)</code> |
| − | + | ||
| − | + | = 24 : Errors = | |
| − | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node219.html CLtL2 Reference] | |
| − | + | ||
| − | + | == 24.1 : General Error-Signalling Functions == | |
| − | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node220.html CLtL2 Reference]<br /> | |
| − | [ | + | |
| − | + | ;variable <code>*ERROR-ABORT-HANDLER*</code><br /> | |
| − | + | :If *error-abort-handler* is non-nil, then an ABORT option is available inside ERROR and CERROR.<br /> | |
| − | + | :If chosen, then the handler is funcalled on no arguments.<br /> | |
| − | + | ||
| − | + | ;variable <code>*ERROR-HANDLER*</code><br /> | |
| − | + | : If *ERROR-SIGNAL* is non-nil, then that function is called upon an error. Otherwise, the debugger is invoked.<br /> | |
| − | + | ||
| − | + | ;variable <code>*ERROR-MESSAGE*</code><br /> | |
| − | + | ||
| − | + | ;function <code>ERROR : (format-string &rest arguments)</code><br /> | |
| − | + | ||
| − | + | ;variable <code>*CONTINUE-CERROR?*</code><br /> | |
| − | + | ||
| − | + | ;function <code>CERROR : (continue-string format-string &rest arguments)</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;variable <code>*IGNORE-WARNS?*</code><br /> | |
| + | :If T, all warnings forms are ignored<br /> | ||
| − | < | + | ;function <code>WARN : (format-string &rest arguments)</code><br /> |
| − | + | ||
| − | + | ;variable <code>*IGNORE-BREAKS?*</code><br /> | |
| − | + | : If non-NIL, all break forms are ignored<br /> | |
| − | + | ||
| − | [ | + | ;function <code>BREAK : (format-string &rest arguments)</code> |
| − | + | ||
| − | + | == 24.2 : Specialized Error-Signalling Forms and Macros == | |
| − | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node221.html CLtL2 Reference]<br /> | |
| − | + | ||
| − | + | ;variable <code>*IGNORE-MUSTS?*</code><br /> | |
| − | + | : If non-NIL, all must forms are ignored<br /> | |
| − | |||
| − | + | ;macro <code>MUST : (form format-string &rest arguments)</code><br /> | |
| − | < | + | ;variable <code>*SUSPEND-TYPE-CHECKING?*</code><br /> |
| − | + | : CHECK-TYPE tests are performed iff this is non-nil<br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;macro <code>CHECK-TYPE : (object pred)</code> | |
| − | + | = 25 : Miscellaneous Features = | |
| − | [ | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node223.html CLtL2 Reference] |
| − | [ | + | |
| − | [ | + | == 25.1 : The Compiler == |
| − | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node224.html CLtL2 Reference] | |
| − | + | ||
| − | + | SubL currently does not provide any compilation support. | |
| − | + | ||
| − | + | == 25.3 : Debugging Tools == | |
| − | [ | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node230.html CLtL2 Reference]<br /> |
| − | + | ||
| − | + | ;macro <code>CTIME : (var &body body)</code><br /> | |
| − | + | ||
| − | + | ;function <code>DEBUG : ()</code><br /> | |
| − | + | Pauses execution and invokes the debugger. | |
| − | + | ||
| − | + | == 25.4.1 : Time Functions == | |
| − | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node232.html CLtL2 Reference]<br /> | |
| − | + | ;variable <code>*EPOCH*</code><br /> | |
| − | + | : *epoch* is the current epoch in use, which is a universal time.<br /> | |
| − | + | :: The system needs to at least be able to handle epochs back to midnight Jan 1 1970.<br /> | |
| − | + | :: *epoch* is globally initialized to midnight Jan 1 1970.<br /> | |
| − | + | :: All universal times are relative to *epoch*.<br /> | |
| − | + | ||
| − | + | ;function <code>GET-UNIVERSAL-TIME : ()</code><br /> | |
| − | + | ||
| − | + | ;function <code>DECODE-UNIVERSAL-TIME : (universal-time)</code><br /> | |
| − | + | ||
| − | + | ;function <code>ENCODE-UNIVERSAL-TIME : (second minute hour date month year)</code><br /> | |
| − | + | ||
| − | + | ;function <code>TIME-FROM-NOW : (delta)</code><br /> | |
| − | + | ||
| − | + | ;function <code>TIME-HAS-ARRIVED? : (time)</code><br /> | |
| − | + | ||
| − | + | ;function <code>ENCODE-TIMESTRING : (second minute hour date month year)</code><br /> | |
| − | [ | + | |
| − | + | ;function <code>TIMESTRING : (&optional (universal-time (get-universal-time)))</code><br /> | |
| − | [ | + | : timestring returns a string in the format dd/mm/yy hh:mm:ss from the<br /> |
| − | [ | + | :: universal time given. If none is given, the current time is used.<br /> |
| − | [ | + | |
| − | + | ;variable <code>*CLOCK-GRANULARITY*</code><br /> | |
| − | + | : *clock-granularity* is the number of internal clock units per second.<br /> | |
| − | + | :: time evals form and returns the number of internal clock units it took<br /> | |
| − | + | :: to execute.<br /> | |
| − | + | ||
| − | + | ;function <code>GET-INTERNAL-REAL-TIME : ()</code><br /> | |
| − | + | ||
| − | + | ;function <code>SLEEP : (seconds)</code> | |
| − | + | ||
| − | + | == 25.5 : Identity Function == | |
| − | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node234.html CLtL2 Reference]<br /> | |
| − | + | ||
| − | + | ;function <code>IDENTITY : (object)</code> | |
| − | + | ||
| − | + | = 26. Loop = | |
| − | + | [http://web.archive.org/web/20051203043858/http://www.supelec.fr/docs/cltl/clm/node235.html CLtL2 Reference] | |
| − | + | no information | |
| − | + | ||
| − | + | = 27. Pretty Printing = | |
| − | + | [http://web.archive.org/web/20051203043922/http://www.supelec.fr/docs/cltl/clm/node253.html CLtL2 Reference] | |
| − | + | no information | |
| − | + | ||
| − | + | = 28 : Common Lisp Object System = | |
| − | + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/node260.html CLtL2 Reference]<br /> | |
| − | + | <br /> | |
| + | ;macro <code>DEFPOLYMORPHIC : (name lambda-list &body body)</code><br /> | ||
| + | :Defines a new polymorphic function that dispatches on the type of its first argument. <body> defines a default method. The function define-method can be used to define additional methods. | ||
| + | For example: | ||
| + | {| | ||
| + | |+ | ||
| + | | (defpolymorphic test (a b) (list a b)) | ||
| + | |+ | ||
| + | | (define-method test ((a cons) b) (cons b a)) | ||
| + | |+ | ||
| + | | (define-method test ((a fixnum) b) (+ a b)) | ||
| + | |+ | ||
| + | | The defpolymorphic form defines the function TEST with a default method.<br /> The two define-method forms specialize the behavior of TEST for lists and fixnums. | ||
| + | |+ | ||
| + | | (test 'foo 'bar) => (FOO BAR) | ||
| + | |+ | ||
| + | | <code>`(test '(foo) 'bar) => (BAR FOO)\</code><br /><code>(test 2 3) => 5</code> | ||
| + | |} | ||
| + | <br /> | ||
| + | ;macro <code>DEFINE-METHOD : (name lambda-list &body body)</code> <br /> | ||
| + | :Defines a method for the polymorphic function <name> | ||
| + | :: that runs if <dispatch-arg> is of type <type>. | ||
| + | :: The lambda list must have the same structure as in the DEFPOLYMORPHIC call. | ||
| + | |||
| + | |||
| + | ----- | ||
| + | |||
| + | = SubL-Specific Features = | ||
| + | |||
| + | == '''SubL.1 : Signals''' == | ||
| + | ; variable <code>*SIGNAL-MAX*</code><br /> | ||
| + | :: There are *signal-max* total signals available.<br /> | ||
| + | |||
| + | ; function <code>DEFAULT-SIGNAL-HANDLER : (signal)</code><br /> | ||
| + | |||
| + | ;function <code>INSTALL-SIGNAL-HANDLER : (signal function)</code><br /> | ||
| + | |||
| + | == '''SubL.2 : System Properties''' == | ||
| + | |||
| + | ; function <code>GET-PROCESS-ID : (&optional default)</code><br /> | ||
| + | : Return the current heavyweight process id of this current SubL program. | ||
| + | : Return DEFAULT if this cannot be determined.<br /> | ||
| − | + | ;function <code>GET-MACHINE-NAME : (&optional default)</code><br /> | |
| − | + | ;function <code>GET-NETWORK-NAME : (&optional default)</code><br /> | |
| − | + | ||
| − | + | ;function <code>GET-USER-NAME : (&optional default)</code><br /> | |
| − | + | ||
| − | + | == '''SubL.3 : Progress Pacifiers''' == | |
| − | + | ;variable <code>*SILENT-PROGRESS?*</code><br /> | |
| − | + | ||
| − | + | ;macro <code>NOTING-ACTIVITY : (string &body body)</code><br /> | |
| − | + | ||
| − | + | ;function <code>NOTE-ACTIVITY : ()</code><br /> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;macro <code>NOTING-NUMERIC-PROGRESS : (string &body body)</code><br /> | |
| − | <br /> | + | ;function <code>NOTE-NUMERIC-PROGRESS : (num)</code><br /> |
| − | + | ||
| − | + | ;macro <code>NOTING-PERCENT-PROGRESS : (string &body body)</code><br /> | |
| − | + | ||
| − | + | ;function <code>NOTE-PERCENT-PROGRESS : (index max)</code><br /> | |
| − | + | ||
| − | + | == '''SubL.4 : Process Manipulation''' == | |
| − | + | ||
| − | [[#FN-DEF- | + | ;function <code>FORK-PROCESS : (function &optional callback output-file)</code><br /> |
| − | [[#FN-DEF- | + | : Spawn a heavyweight child process to call FUNCTION, which takes no arguments.<br /> |
| − | [[#FN-DEF- | + | : FUNCTION must return an integer.<br /> |
| − | [[#FN-DEF- | + | : CALLBACK, if provided, must be a function of one argument which is called on the returned value within the address space of the parent process. |
| − | [[#FN-DEF- | + | : OUTPUT-FILE, if provided, is a file to which standard output and error are piped<br /> |
| + | while executing FUNCTION. | ||
| + | |||
| + | ;function <code>RESTART-PROCESS : (&optional world-spec init-file-pathname init-form-spec)</code> | ||
| + | : Restart the current heavyweight process.<br /> | ||
| + | :: WORLD-SPEC, if provided, is the filename of a world to use.<br /> | ||
| + | :: INIT-FILE-PATHNAME, if provided, is a file of initializatio forms to eval.<br /> | ||
| + | :: INIT-FORM-SPEC, if provided, is a form to execute.<br /> | ||
| + | : The values used for these when the current process was started are used if unprovided.<br /> | ||
| + | |||
| + | == '''SubL.5 : Memory Interaction''' == | ||
| + | |||
| + | ;function <code>GC : (&optional level)</code><br /> | ||
| + | |||
| + | ;macro <code>WITH-STATIC-AREA : (&body body)</code><br /> | ||
| + | |||
| + | ;function <code>WRITE-IMAGE : (filename &optional do-full-gc)</code><br /> | ||
| + | :: Save the current state of virtual memory in a file called FILENAME.<br /> | ||
| + | :: If DO-FULL-GC is true, then a full garbage collection is performed before writing the image. | ||
| + | :: Otherwise, a dynamic garbage collection is performed and remaining objects are promoted to being static ones. | ||
| + | |||
| + | : During the initialization of a SubL system at startup, variables defined via [[#FN-DEF-DEFVAR|<code>DEFVAR</code>]] have their initial values set via their state in the world file used at startup, ignoring the initial value specified by the code. [[#FN-DEF-DEFPARAMETER|<code>DEFPARAMETER</code>]] variables and [[#FN-DEF-DEFCONSTANT|<code>DEFCONSTANT</code>]] global constants have their values initialized via the code on startup. | ||
| + | |||
| + | : The net result of this distinction is as follows: if a world is saved out via WRITE-IMAGE, and then used to restart a SubL system, the values of [[#FN-DEF-DEFVAR|<code>DEFVAR</code>]] variables will persist, while any changes to [[#FN-DEF-DEFPARAMETER|<code>DEFPARAMETER</code>]] variables will be lost when they are reset to their original code-specified initial values on startup. | ||
| + | |||
| + | = Index = | ||
| + | |||
| + | [http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/index.html CLtL2 Reference] | ||
| − | + | '''[[#Index-A|A]] | [[#Index-B|B]] | [[#Index-C|C]] | [[#Index-D|D]] | [[#Index-E|E]] | [[#Index-F|F]] | [[#Index-G|G]] | [[#Index-H|H]] | [[#Index-I|I]] | [[#Index-J|J]] | [[#Index-K|K]] | [[#Index-L|L]] | [[#Index-M|M]] | [[#Index-N|N]] | [[#Index-O|O]] | [[#Index-P|P]] | [[#Index-Q|Q]] | [[#Index-R|R]] | [[#Index-S|S]] | [[#Index-T|T]] | [[#Index-U|U]] | [[#Index-V|V]] | [[#Index-W|W]] | [[#Index-X|X]] | [[#Index-Y|Y]] | [[#Index-Z|Z]]''' | |
<br /> | <br /> | ||
| − | [[#FN-DEF- | + | [[#FN-DEF-1280|<code>*</code>]] function<br /> |
| − | [[# | + | [[#SYM-DEF-1280|<code>*</code>]] variable<br /> |
| − | [[# | + | [[#SYM-DEF-165120|<code>**</code>]] variable<br /> |
| − | [[# | + | [[#SYM-DEF-21136640|<code>***</code>]] variable<br /> |
| − | [[# | + | [[#SYM-DEF-1161467279|<code>*CLOCK-GRANULARITY*</code>]] variable<br /> |
| − | [[# | + | [[#SYM-DEF-1424597890|<code>*CONTINUE-CERROR?*</code>]] variable<br /> |
| − | [[# | + | [[#SYM-DEF-609384130|<code>*DEFAULT-PATHNAME-DEFAULTS*</code>]] variable<br /> |
| − | [[# | + | [[#SYM-DEF-2020021124|<code>*EPOCH*</code>]] variable<br /> |
| − | [[# | + | [[#SYM-DEF-860597104|<code>*ERROR-ABORT-HANDLER*</code>]] variable<br /> |
| − | [[# | + | [[#SYM-DEF-354311860|<code>*ERROR-HANDLER*</code>]] variable<br /> |
| − | [[# | + | [[#SYM-DEF-1079241228|<code>*ERROR-MESSAGE*</code>]] variable<br /> |
| − | [[# | + | [[#SYM-DEF-704643174|<code>*ERROR-OUTPUT*</code>]] variable<br /> |
| − | [[# | + | [[#SYM-DEF-204607828|<code>*IGNORE-BREAKS?*</code>]] variable<br /> |
| − | [[# | + | [[#SYM-DEF-2065003033|<code>*IGNORE-MUSTS?*</code>]] variable<br /> |
| − | [[# | + | [[#SYM-DEF-1528898064|<code>*IGNORE-WARNS?*</code>]] variable<br /> |
| − | [[# | + | [[#SYM-DEF-1188374285|<code>*MOST-NEGATIVE-FIXNUM*</code>]] variable<br /> |
| − | [[# | + | [[#SYM-DEF-113980253|<code>*MOST-POSITIVE-FIXNUM*</code>]] variable<br /> |
| − | [[# | + | [[#SYM-DEF-1624760991|<code>*MULTIPLE-VALUES-LIMIT*</code>]] variable<br /> |
| − | [[# | + | [[#SYM-DEF-1405149315|<code>*NULL-OUTPUT*</code>]] variable<br /> |
| − | [[#FN-DEF- | + | [[#SYM-DEF-313735324|<code>*PRINT-ESCAPE*</code>]] variable<br /> |
| − | [[#FN-DEF- | + | [[#SYM-DEF-430643141|<code>*RAND-MAX*</code>]] variable<br /> |
| − | [[#FN-DEF- | + | [[#SYM-DEF-371148559|<code>*SIGNAL-MAX*</code>]] variable<br /> |
| − | [[#FN-DEF- | + | [[#SYM-DEF-694198800|<code>*SILENT-PROGRESS?*</code>]] variable<br /> |
| − | [[#FN-DEF- | + | [[#SYM-DEF-1112282190|<code>*STANDARD-INPUT*</code>]] variable<br /> |
| − | [[#FN-DEF- | + | [[#SYM-DEF-1982975489|<code>*STANDARD-OUTPUT*</code>]] variable<br /> |
| − | [[#FN-DEF- | + | [[#SYM-DEF-1570894042|<code>*SUSPEND-TYPE-CHECKING?*</code>]] variable<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-+|<code>+</code>]] function<br /> |
| + | [[#FN-DEF--|<code>-</code>]] function<br /> | ||
| + | [[#FN-DEF-/|<code>/</code>]] function<br /> | ||
| + | [[#FN-DEF-/=|<code>/=</code>]] function<br /> | ||
| + | [[#FN-DEF-3584|<code><</code>]] function<br /> | ||
| + | [[#FN-DEF-462464|<code><=</code>]] function<br /> | ||
| + | [[#FN-DEF-=|<code>=</code>]] function<br /> | ||
| + | [[#FN-DEF-3840|<code>></code>]] function<br /> | ||
| + | [[#FN-DEF-495232|<code>>=</code>]] function | ||
| − | ==== | + | ==== A ==== |
<br /> | <br /> | ||
| − | [[#FN-DEF- | + | [[#FN-DEF-ACONS|<code>ACONS</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-ADJOIN|<code>ADJOIN</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-ALERT-USER|<code>ALERT-USER</code>]] function<br /> |
| − | + | [[#FN-DEF-ALPHA-CHAR-P|<code>ALPHA-CHAR-P</code>]] function<br /> | |
| − | + | [[#FN-DEF-ALPHANUMERICP|<code>ALPHANUMERICP</code>]] function<br /> | |
| − | [[#FN-DEF- | + | [[#FN-DEF-APPEND|<code>APPEND</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-APPEND-FILES|<code>APPEND-FILES</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-APPLY|<code>APPLY</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-AREF|<code>AREF</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-ASSOC|<code>ASSOC</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-ASSOC-IF|<code>ASSOC-IF</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-ATOM|<code>ATOM</code>]] function |
| − | [[#FN-DEF- | ||
| − | [[#FN-DEF- | ||
| − | ==== | + | ==== B ==== |
<br /> | <br /> | ||
| − | [[#FN-DEF- | + | [[#FN-DEF-BOTH-CASE-P|<code>BOTH-CASE-P</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-BOUNDP|<code>BOUNDP</code>]] function<br /> |
| + | [[#FN-DEF-BREAK|<code>BREAK</code>]] function<br /> | ||
| + | [[#FN-DEF-BUTLAST|<code>BUTLAST</code>]] function<br /> | ||
| + | [[#FN-DEF-BYTE|<code>BYTE</code>]] macro | ||
| − | ==== | + | ==== C ==== |
<br /> | <br /> | ||
| − | [[#FN-DEF- | + | [[#FN-DEF-CAAR|<code>CAAR</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-CADR|<code>CADR</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-CAND|<code>CAND</code>]] macro<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-CAR|<code>CAR</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-CCATCH|<code>CCATCH</code>]] macro<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-CCONCATENATE|<code>CCONCATENATE</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-CDAR|<code>CDAR</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-CDDR|<code>CDDR</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-CDEC|<code>CDEC</code>]] macro<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-CDESTRUCTURING-BIND|<code>CDESTRUCTURING-BIND</code>]] macro<br /> |
| − | + | [[#FN-DEF-CDO|<code>CDO</code>]] macro<br /> | |
| − | + | [[#FN-DEF-CDOHASH|<code>CDOHASH</code>]] macro<br /> | |
| − | + | [[#FN-DEF-CDOLIST|<code>CDOLIST</code>]] macro<br /> | |
| − | [[|]] | + | [[#FN-DEF-CDOTIMES|<code>CDOTIMES</code>]] macro<br /> |
| − | + | [[#FN-DEF-CDR|<code>CDR</code>]] function<br /> | |
| − | + | [[#FN-DEF-CEILING|<code>CEILING</code>]] function<br /> | |
| − | + | [[#FN-DEF-CERROR|<code>CERROR</code>]] function<br /> | |
| − | <br /> | + | [[#FN-DEF-CHAR|<code>CHAR</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-CHAR-CODE|<code>CHAR-CODE</code>]] function<br /> |
| − | + | [[#FN-DEF-CHAR-DOWNCASE|<code>CHAR-DOWNCASE</code>]] function<br /> | |
| − | + | [[#FN-DEF-CHAR-EQUAL|<code>CHAR-EQUAL</code>]] function<br /> | |
| − | + | [[#FN-DEF-CHAR-GREATERP|<code>CHAR-GREATERP</code>]] function<br /> | |
| − | <br /> | + | [[#FN-DEF-CHAR-LESSP|<code>CHAR-LESSP</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-CHAR-NOT-EQUAL|<code>CHAR-NOT-EQUAL</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-CHAR-NOT-GREATERP|<code>CHAR-NOT-GREATERP</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-CHAR-NOT-LESSP|<code>CHAR-NOT-LESSP</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-CHAR-UPCASE|<code>CHAR-UPCASE</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-CHAR/=|<code>CHAR/=</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-137661468|<code>CHAR<</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-440795332|<code>CHAR<=</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-CHAR=|<code>CHAR=</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-137661724|<code>CHAR></code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-440828100|<code>CHAR>=</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-CHARACTERP|<code>CHARACTERP</code>]] function<br /> |
| − | + | [[#FN-DEF-CHECK-TYPE|<code>CHECK-TYPE</code>]] macro<br /> | |
| − | == | + | [[#FN-DEF-CINC|<code>CINC</code>]] macro<br /> |
| − | + | [[#FN-DEF-CLET|<code>CLET</code>]] macro<br /> | |
| − | <br /> | + | [[#FN-DEF-CLOSE|<code>CLOSE</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-CLRHASH|<code>CLRHASH</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-CMERGE|<code>CMERGE</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-CMULTIPLE-VALUE-BIND|<code>CMULTIPLE-VALUE-BIND</code>]] macro<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-CNOT|<code>CNOT</code>]] macro<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-CODE-CHAR|<code>CODE-CHAR</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-CONS|<code>CONS</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-CONSP|<code>CONSP</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-CONSTANTP|<code>CONSTANTP</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-CONSTRUCT-FILENAME|<code>CONSTRUCT-FILENAME</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-COPY-ALIST|<code>COPY-ALIST</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-COPY-LIST|<code>COPY-LIST</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-COPY-SEQ|<code>COPY-SEQ</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-COPY-TREE|<code>COPY-TREE</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-COR|<code>COR</code>]] macro<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-COUNT|<code>COUNT</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-COUNT-IF|<code>COUNT-IF</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-CPOP|<code>CPOP</code>]] macro<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-CPROGV|<code>CPROGV</code>]] macro<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-CPUSH|<code>CPUSH</code>]] macro<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-CPUSHNEW|<code>CPUSHNEW</code>]] macro<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-CREDUCE|<code>CREDUCE</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-CSETF|<code>CSETF</code>]] macro<br /> |
| + | [[#FN-DEF-CSETQ|<code>CSETQ</code>]] macro<br /> | ||
| + | [[#FN-DEF-CSOME|<code>CSOME</code>]] macro<br /> | ||
| + | [[#FN-DEF-CTIME|<code>CTIME</code>]] macro<br /> | ||
| + | [[#FN-DEF-CUNWIND-PROTECT|<code>CUNWIND-PROTECT</code>]] macro | ||
| − | ==== | + | ==== D ==== |
<br /> | <br /> | ||
| − | [[#FN-DEF- | + | [[#FN-DEF-DEBUG|<code>DEBUG</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-DECLAIM|<code>DECLAIM</code>]] macro<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-DECLARE|<code>DECLARE</code>]] function<br /> |
| − | + | [[#FN-DEF-DECODE-UNIVERSAL-TIME|<code>DECODE-UNIVERSAL-TIME</code>]] function<br /> | |
| − | [[#FN-DEF- | + | [[#FN-DEF-DEFAULT-SIGNAL-HANDLER|<code>DEFAULT-SIGNAL-HANDLER</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-DEFAULT-STRUCT-PRINT-FUNCTION|<code>DEFAULT-STRUCT-PRINT-FUNCTION</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-DEFCONSTANT|<code>DEFCONSTANT</code>]] macro<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-DEFINE|<code>DEFINE</code>]] macro<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-DEFINE-METHOD|<code>DEFINE-METHOD</code>]] macro<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-DEFMACRO|<code>DEFMACRO</code>]] macro<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-DEFPARAMETER|<code>DEFPARAMETER</code>]] macro<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-DEFPOLYMORPHIC|<code>DEFPOLYMORPHIC</code>]] macro<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-DEFSTRUCT|<code>DEFSTRUCT</code>]] macro<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-DEFVAR|<code>DEFVAR</code>]] macro<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-DELETE|<code>DELETE</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-DELETE-DUPLICATES|<code>DELETE-DUPLICATES</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-DELETE-FILE|<code>DELETE-FILE</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-DELETE-IF|<code>DELETE-IF</code>]] function<br /> |
| − | + | [[#FN-DEF-DIGIT-CHAR-P|<code>DIGIT-CHAR-P</code>]] function<br /> | |
| − | + | [[#FN-DEF-DIRECTORY|<code>DIRECTORY</code>]] function<br /> | |
| − | [[#FN-DEF- | + | [[#FN-DEF-DPB|<code>DPB</code>]] function |
| − | |||
| − | [[#FN-DEF- | ||
| − | |||
| − | [[#FN-DEF- | ||
| − | |||
| − | [[#FN-DEF- | ||
| − | |||
| − | ==== | + | ==== E ==== |
<br /> | <br /> | ||
| − | [[#FN-DEF- | + | [[#FN-DEF-EIGHTH|<code>EIGHTH</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-ELT|<code>ELT</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-ENCODE-TIMESTRING|<code>ENCODE-TIMESTRING</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-ENCODE-UNIVERSAL-TIME|<code>ENCODE-UNIVERSAL-TIME</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-ENDP|<code>ENDP</code>]] function<br /> |
| + | [[#FN-DEF-EQ|<code>EQ</code>]] function<br /> | ||
| + | [[#FN-DEF-EQL|<code>EQL</code>]] function<br /> | ||
| + | [[#FN-DEF-EQUAL|<code>EQUAL</code>]] function<br /> | ||
| + | [[#FN-DEF-EQUALP|<code>EQUALP</code>]] function<br /> | ||
| + | [[#FN-DEF-ERROR|<code>ERROR</code>]] function<br /> | ||
| + | [[#FN-DEF-EVAL|<code>EVAL</code>]] function<br /> | ||
| + | [[#FN-DEF-EVENP|<code>EVENP</code>]] function | ||
| − | ==== | + | ==== F ==== |
<br /> | <br /> | ||
| − | [[#FN-DEF- | + | [[#FN-DEF-FBOUNDP|<code>FBOUNDP</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-FIF|<code>FIF</code>]] macro<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-FIFTH|<code>FIFTH</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-FILE-AUTHOR|<code>FILE-AUTHOR</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-FILE-LENGTH|<code>FILE-LENGTH</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-FILE-WRITE-DATE|<code>FILE-WRITE-DATE</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-FILL|<code>FILL</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-FIND|<code>FIND</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-FIND-IF|<code>FIND-IF</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-FIND-SYMBOL|<code>FIND-SYMBOL</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-FIRST|<code>FIRST</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-FIXNUMP|<code>FIXNUMP</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-FLOAT|<code>FLOAT</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-FLOATP|<code>FLOATP</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-FLOOR|<code>FLOOR</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-FMAKUNBOUND|<code>FMAKUNBOUND</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-FORCE-OUTPUT|<code>FORCE-OUTPUT</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-FORK-PROCESS|<code>FORK-PROCESS</code>]] function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-FORMAT|<code>FORMAT</code>]] function<br /> |
| + | [[#FN-DEF-FOURTH|<code>FOURTH</code>]] function<br /> | ||
| + | [[#FN-DEF-FUNCALL|<code>FUNCALL</code>]] function<br /> | ||
| + | [[#FN-DEF-FUNCTION|<code>FUNCTION</code>]] macro<br /> | ||
| + | [[#FN-DEF-FUNCTION-INFORMATION|<code>FUNCTION-INFORMATION</code>]] function<br /> | ||
| + | [[#FN-DEF-FUNCTION-SPEC-P|<code>FUNCTION-SPEC-P</code>]] function<br /> | ||
| + | [[#FN-DEF-FUNCTIONP|<code>FUNCTIONP</code>]] function<br /> | ||
| + | [[#FN-DEF-FUNLESS|<code>FUNLESS</code>]] macro<br /> | ||
| + | [[#FN-DEF-FWHEN|<code>FWHEN</code>]] macro | ||
| − | ==== | + | ==== G ==== |
| + | |||
| + | <br /> | ||
| + | [[#FN-DEF-GC|<code>GC</code>]] function<br /> | ||
| + | [[#FN-DEF-GENSYM|<code>GENSYM</code>]] function<br /> | ||
| + | [[#FN-DEF-GENTEMP|<code>GENTEMP</code>]] function<br /> | ||
| + | [[#FN-DEF-GET|<code>GET</code>]] function<br /> | ||
| + | [[#FN-DEF-GET-CONSING-STATE|<code>GET-CONSING-STATE</code>]] function<br /> | ||
| + | [[#FN-DEF-GET-FILE-POSITION|<code>GET-FILE-POSITION</code>]] function<br /> | ||
| + | [[#FN-DEF-GET-INTERNAL-REAL-TIME|<code>GET-INTERNAL-REAL-TIME</code>]] function<br /> | ||
| + | [[#FN-DEF-GET-MACHINE-NAME|<code>GET-MACHINE-NAME</code>]] function<br /> | ||
| + | [[#FN-DEF-GET-NETWORK-NAME|<code>GET-NETWORK-NAME</code>]] function<br /> | ||
| + | [[#FN-DEF-GET-PROCESS-ID|<code>GET-PROCESS-ID</code>]] function<br /> | ||
| + | [[#FN-DEF-GET-STRING-FROM-USER|<code>GET-STRING-FROM-USER</code>]] function<br /> | ||
| + | [[#FN-DEF-GET-UNIVERSAL-TIME|<code>GET-UNIVERSAL-TIME</code>]] function<br /> | ||
| + | [[#FN-DEF-GET-USER-NAME|<code>GET-USER-NAME</code>]] function<br /> | ||
| + | [[#FN-DEF-GETHASH|<code>GETHASH</code>]] function | ||
| + | |||
| + | ==== H ==== | ||
<br /> | <br /> | ||
| − | [[#FN-DEF- | + | [[#FN-DEF-HASH-TABLE-COUNT|<code>HASH-TABLE-COUNT</code>]] function<br /> |
| + | [[#FN-DEF-HASH-TABLE-P|<code>HASH-TABLE-P</code>]] function | ||
| − | ==== | + | ==== I ==== |
<br /> | <br /> | ||
| − | [[#FN-DEF- | + | [[#FN-DEF-IDENTITY|<code>IDENTITY</code>]] function<br /> |
| − | + | [[#FN-DEF-IGNORE|<code>IGNORE</code>]] function<br /> | |
| − | [[#FN-DEF- | + | [[#FN-DEF-IN-PACKAGE|<code>IN-PACKAGE</code>]] macro<br /> |
| − | + | [[#FN-DEF-INPUT-STREAM-P|<code>INPUT-STREAM-P</code>]] function<br /> | |
| − | [[#FN-DEF- | + | [[#FN-DEF-INSTALL-SIGNAL-HANDLER|<code>INSTALL-SIGNAL-HANDLER</code>]] function<br /> |
| − | + | [[#FN-DEF-INT/|<code>INT/</code>]] function<br /> | |
| − | [[#FN-DEF- | + | [[#FN-DEF-INTEGER-DECODE-FLOAT|<code>INTEGER-DECODE-FLOAT</code>]] function<br /> |
| − | + | [[#FN-DEF-INTEGERP|<code>INTEGERP</code>]] function<br /> | |
| − | [[#FN-DEF- | + | [[#FN-DEF-INTERN|<code>INTERN</code>]] function<br /> |
| − | + | [[#FN-DEF-INTERSECTION|<code>INTERSECTION</code>]] function | |
| − | + | ||
| − | + | ==== J ==== | |
| − | [[#FN-DEF- | + | |
| − | + | ||
| − | [[#FN-DEF- | + | |
| − | + | ==== K ==== | |
| − | [[#FN-DEF- | + | |
| − | + | <br /> | |
| − | [[#FN-DEF- | + | [[#FN-DEF-KEYWORDP|<code>KEYWORDP</code>]] function |
| − | |||
| − | [[#FN-DEF- | ||
| − | |||
| − | |||
| − | [[#FN-DEF- | ||
| − | |||
| − | ==== | + | ==== L ==== |
<br /> | <br /> | ||
| − | [[#FN-DEF- | + | [[#FN-DEF-LAST|<code>LAST</code>]] function<br /> |
| − | + | [[#FN-DEF-LDB|<code>LDB</code>]] function<br /> | |
| − | [[#FN-DEF- | + | [[#FN-DEF-LDIFF|<code>LDIFF</code>]] function<br /> |
| − | + | [[#FN-DEF-LENGTH|<code>LENGTH</code>]] function<br /> | |
| − | [[#FN-DEF- | + | [[#FN-DEF-LIST|<code>LIST</code>]] function<br /> |
| − | + | [[#FN-DEF-443877220|<code>LIST*</code>]] function<br /> | |
| − | [[#FN-DEF- | + | [[#FN-DEF-LIST-LENGTH|]]<code>LIST-LENGTH</code> function function<br /> |
| − | + | [[#FN-DEF-LISTP|]]<code>LISTP</code> function<br /> | |
| − | [[#FN-DEF- | + | [[#FN-DEF-LOAD|]]<code>LOAD</code> function<br /> |
| − | + | [[#FN-DEF-LOG-MESSAGE|]]<code>LOG-MESSAGE</code> function<br /> | |
| − | [[#FN-DEF- | + | [[#FN-DEF-LOWER-CASE-P|]]<code>LOWER-CASE-P</code> function |
| − | + | ||
| − | [[#FN-DEF- | + | ==== M ==== |
| − | [[#FN-DEF- | + | |
| − | [[#FN-DEF- | + | <br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-MAKE-HASH-TABLE|]]<code>MAKE-HASH-TABLE</code> function<br /> |
| − | + | [[#FN-DEF-MAKE-LIST|]]<code>MAKE-LIST</code> function<br /> | |
| − | + | [[#FN-DEF-MAKE-STRING|]]<code>MAKE-STRING</code> function<br /> | |
| − | [[#FN-DEF- | + | [[#FN-DEF-MAKE-SYMBOL|]]<code>MAKE-SYMBOL</code> function<br /> |
| − | + | [[#FN-DEF-MAKE-VECTOR|]]<code>MAKE-VECTOR</code> function<br /> | |
| − | + | [[#FN-DEF-MAKUNBOUND|]]<code>MAKUNBOUND</code> function<br /> | |
| − | + | [[#FN-DEF-MAPC|]]<code>MAPC</code> function<br /> | |
| − | + | [[#FN-DEF-MAPCAN|]]<code>MAPCAN</code> function<br /> | |
| − | + | [[#FN-DEF-MAPCAR|]]<code>MAPCAR</code> function<br /> | |
| − | + | [[#FN-DEF-MAPCON|]]<code>MAPCON</code> function<br /> | |
| − | [[#FN-DEF- | + | [[#FN-DEF-MAPHASH|]]<code>MAPHASH</code> function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-MAPL|]]<code>MAPL</code> function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-MAPLIST|]]<code>MAPLIST</code> function<br /> |
| − | + | [[#FN-DEF-MAX|]]<code>MAX</code> function<br /> | |
| − | + | [[#FN-DEF-MEMBER|]]<code>MEMBER</code> function<br /> | |
| − | [[#FN-DEF- | + | [[#FN-DEF-MEMBER-IF|]]<code>MEMBER-IF</code> function<br /> |
| − | + | [[#FN-DEF-MIN|]]<code>MIN</code> function<br /> | |
| − | [[#FN-DEF- | + | [[#FN-DEF-MINUSP|]]<code>MINUSP</code> function<br /> |
| − | + | [[#FN-DEF-MISMATCH|]]<code>MISMATCH</code> function<br /> | |
| − | [[#FN-DEF- | + | [[#FN-DEF-MOD|]]<code>MOD</code> macro<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-MULTIPLE-VALUE-LIST|]]<code>MULTIPLE-VALUE-LIST</code> macro<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-MUST|]]<code>MUST</code> function |
| − | [[#FN-DEF- | + | |
| − | [[#FN-DEF- | + | ==== N ==== |
| − | [[#FN-DEF- | ||
| − | [[#FN-DEF- | ||
| − | [[#FN-DEF- | ||
| − | [[#FN-DEF- | ||
| − | [[#FN-DEF- | ||
| − | [[#FN-DEF- | ||
| − | [[#FN-DEF- | ||
| − | [[#FN-DEF- | ||
| − | [[#FN-DEF- | ||
| − | [[#FN-DEF- | ||
| − | [[#FN-DEF- | ||
| − | |||
| − | |||
| − | [[#FN-DEF- | ||
| − | |||
| − | ==== | ||
<br /> | <br /> | ||
| − | [[#FN-DEF- | + | [[#FN-DEF-NBUTLAST|]]<code>NBUTLAST</code> function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-NCONC|]]<code>NCONC</code> function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-NINTERSECTION|]]<code>NINTERSECTION</code> function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-NINTH|]]<code>NINTH</code> function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-NOTE-ACTIVITY|]]<code>NOTE-ACTIVITY</code> function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-NOTE-NUMERIC-PROGRESS|]]<code>NOTE-NUMERIC-PROGRESS</code> function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-NOTE-PERCENT-PROGRESS|]]<code>NOTE-PERCENT-PROGRESS</code> function<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-NOTIFY-USER|]]<code>NOTIFY-USER</code> macro<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-NOTING-ACTIVITY|]]<code>NOTING-ACTIVITY</code> macro<br /> |
| − | [[#FN-DEF- | + | [[#FN-DEF-NOTING-NUMERIC-PROGRESS|]]<code>NOTING-NUMERIC-PROGRESS</code> macro<br /> |
| + | [[#FN-DEF-NOTING-PERCENT-PROGRESS|]]<code>NOTING-PERCENT-PROGRESS</code> function<br /> | ||
| + | [[#FN-DEF-NRECONC|]]<code>NRECONC</code> function<br /> | ||
| + | [[#FN-DEF-NREVERSE|]]<code>NREVERSE</code> function<br /> | ||
| + | [[#FN-DEF-NSET-DIFFERENCE|]]<code>NSET-DIFFERENCE</code> function<br /> | ||
| + | [[#FN-DEF-NSET-EXCLUSIVE-OR|]]<code>NSET-EXCLUSIVE-OR</code> function<br /> | ||
| + | [[#FN-DEF-NSTRING-CAPITALIZE|]]<code>NSTRING-CAPITALIZE</code> function<br /> | ||
| + | [[#FN-DEF-NSTRING-DOWNCASE|]]<code>NSTRING-DOWNCASE</code> function<br /> | ||
| + | [[#FN-DEF-NSTRING-UPCASE|]]<code>NSTRING-UPCASE</code> function<br /> | ||
| + | [[#FN-DEF-NSUBLIS|]]<code>NSUBLIS</code> function<br /> | ||
| + | [[#FN-DEF-NSUBST|]]<code>NSUBST</code> function<br /> | ||
| + | [[#FN-DEF-NSUBST-IF|]]<code>NSUBST-IF</code> function<br /> | ||
| + | [[#FN-DEF-NSUBSTITUTE|]]<code>NSUBSTITUTE</code> function<br /> | ||
| + | [[#FN-DEF-NSUBSTITUTE-IF|]]<code>NSUBSTITUTE-IF</code> function<br /> | ||
| + | [[#FN-DEF-NTH|]]<code>NTH</code> function<br /> | ||
| + | [[#FN-DEF-NTHCDR|]]<code>NTHCDR</code> function<br /> | ||
| + | [[#FN-DEF-NULL|]]<code>NULL</code> function<br /> | ||
| + | [[#FN-DEF-NUMBERP|]]<code>NUMBERP</code> function<br /> | ||
| + | [[#FN-DEF-NUNION|]]<code>NUNION</code> function | ||
| + | |||
| + | ==== O ==== | ||
| + | |||
| + | <br /> | ||
| + | [[#FN-DEF-ODDP|]]<code>ODDP</code> function<br /> | ||
| + | [[#FN-DEF-OPEN-BINARY|]]<code>OPEN-BINARY</code> function<br /> | ||
| + | [[#FN-DEF-OPEN-TCP-STREAM|]]<code>OPEN-TCP-STREAM</code> function<br /> | ||
| + | [[#FN-DEF-OPEN-TEXT|]]<code>OPEN-TEXT</code> function<br /> | ||
| + | [[#FN-DEF-OUTPUT-STREAM-P|]]<code>OUTPUT-STREAM-P</code> function | ||
| − | ==== U ==== | + | ==== P ==== |
| + | |||
| + | <br /> | ||
| + | [[#FN-DEF-PAIRLIS|]]<code>PAIRLIS</code> macro<br /> | ||
| + | [[#FN-DEF-PCASE|]]<code>PCASE</code> macro<br /> | ||
| + | [[#FN-DEF-PCOND|]]<code>PCOND</code> macro<br /> | ||
| + | [[#FN-DEF-PIF|]]<code>PIF</code> function<br /> | ||
| + | [[#FN-DEF-PLUSP|]]<code>PLUSP</code> function<br /> | ||
| + | [[#FN-DEF-POSITION|]]<code>POSITION</code> function<br /> | ||
| + | [[#FN-DEF-POSITION-IF|]]<code>POSITION-IF</code> function<br /> | ||
| + | [[#FN-DEF-PRIN1|]]<code>PRIN1</code> function<br /> | ||
| + | [[#FN-DEF-PRIN1-TO-STRING|]]<code>PRIN1-TO-STRING</code> function<br /> | ||
| + | [[#FN-DEF-PRINC|]]<code>PRINC</code> function<br /> | ||
| + | [[#FN-DEF-PRINC-TO-STRING|]]<code>PRINC-TO-STRING</code> function<br /> | ||
| + | [[#FN-DEF-PRINT|]]<code>PRINT</code> macro<br /> | ||
| + | [[#FN-DEF-PRINTING-OBJECT|]]<code>PRINTING-OBJECT</code> function<br /> | ||
| + | [[#FN-DEF-PROBE-FILE|]]<code>PROBE-FILE</code> function<br /> | ||
| + | [[#FN-DEF-PROCLAIM|]]<code>PROCLAIM</code> macro<br /> | ||
| + | [[#FN-DEF-PROGN|]]<code>PROGN</code> macro<br /> | ||
| + | [[#FN-DEF-PUNLESS|]]<code>PUNLESS</code> function<br /> | ||
| + | [[#FN-DEF-PUT|]]<code>PUT</code> macro<br /> | ||
| + | [[#FN-DEF-PWHEN|]]<code>PWHEN</code> function | ||
| + | |||
| + | ==== Q ==== | ||
| + | |||
| + | <br /> | ||
| + | [[#FN-DEF-QUOTE|]]<code>QUOTE</code> function | ||
| + | |||
| + | ==== R ==== | ||
| + | |||
| + | <br /> | ||
| + | [[#FN-DEF-RANDOM|]]<code>RANDOM</code> function<br /> | ||
| + | [[#FN-DEF-RASSOC|]]<code>RASSOC</code> function<br /> | ||
| + | [[#FN-DEF-RASSOC-IF|]]<code>RASSOC-IF</code> function<br /> | ||
| + | [[#FN-DEF-READ|]]<code>READ</code> function<br /> | ||
| + | [[#FN-DEF-READ-BYTE|]]<code>READ-BYTE</code> function<br /> | ||
| + | [[#FN-DEF-READ-CHAR|]]<code>READ-CHAR</code> function<br /> | ||
| + | [[#FN-DEF-READ-FROM-STRING|]]<code>READ-FROM-STRING</code> function<br /> | ||
| + | [[#FN-DEF-READ-LINE|]]<code>READ-LINE</code> function<br /> | ||
| + | [[#FN-DEF-REM|]]<code>REM</code> function<br /> | ||
| + | [[#FN-DEF-REMHASH|]]<code>REMHASH</code> function<br /> | ||
| + | [[#FN-DEF-REMOVE|]]<code>REMOVE</code> function<br /> | ||
| + | [[#FN-DEF-REMOVE-DUPLICATES|]]<code>REMOVE-DUPLICATES</code> function<br /> | ||
| + | [[#FN-DEF-REMOVE-IF|]]<code>REMOVE-IF</code> function<br /> | ||
| + | [[#FN-DEF-REMPROP|]]<code>REMPROP</code> function<br /> | ||
| + | [[#FN-DEF-RENAME-FILE|]]<code>RENAME-FILE</code> function<br /> | ||
| + | [[#FN-DEF-REPLACE|]]<code>REPLACE</code> function<br /> | ||
| + | [[#FN-DEF-REPORT-ERROR|]]<code>REPORT-ERROR</code> function<br /> | ||
| + | [[#FN-DEF-REST|]]<code>REST</code> function<br /> | ||
| + | [[#FN-DEF-RESTART-PROCESS|]]<code>RESTART-PROCESS</code> macro<br /> | ||
| + | [[#FN-DEF-RET|]]<code>RET</code> function<br /> | ||
| + | [[#FN-DEF-REVAPPEND|]]<code>REVAPPEND</code> function<br /> | ||
| + | [[#FN-DEF-REVERSE|]]<code>REVERSE</code> function<br /> | ||
| + | [[#FN-DEF-ROUND|]]<code>ROUND</code> function<br /> | ||
| + | [[#FN-DEF-RPLACA|]]<code>RPLACA</code> function<br /> | ||
| + | [[#FN-DEF-RPLACD|]]<code>RPLACD</code> function | ||
| + | |||
| + | ==== S ==== | ||
| + | |||
| + | <br /> | ||
| + | [[#FN-DEF-SCALE-FLOAT|]]<code>SCALE-FLOAT</code> function<br /> | ||
| + | [[#FN-DEF-SEARCH|]]<code>SEARCH</code> function<br /> | ||
| + | [[#FN-DEF-SECOND|]]<code>SECOND</code> function<br /> | ||
| + | [[#FN-DEF-SEED-RANDOM|]]<code>SEED-RANDOM</code> function<br /> | ||
| + | [[#FN-DEF-SEQUENCEP|]]<code>SEQUENCEP</code> function<br /> | ||
| + | [[#FN-DEF-SET|]]<code>SET</code> function<br /> | ||
| + | [[#FN-DEF-SET-AREF|]]<code>SET-AREF</code> function<br /> | ||
| + | [[#FN-DEF-SET-CHAR|]]<code>SET-CHAR</code> function<br /> | ||
| + | [[#FN-DEF-SET-CONSING-STATE|]]<code>SET-CONSING-STATE</code> function<br /> | ||
| + | [[#FN-DEF-SET-DIFFERENCE|]]<code>SET-DIFFERENCE</code> function<br /> | ||
| + | [[#FN-DEF-SET-EXCLUSIVE-OR|]]<code>SET-EXCLUSIVE-OR</code> function<br /> | ||
| + | [[#FN-DEF-SET-FILE-POSITION|]]<code>SET-FILE-POSITION</code> function<br /> | ||
| + | [[#FN-DEF-SET-NTH|]]<code>SET-NTH</code> function<br /> | ||
| + | [[#FN-DEF-SETHASH|]]<code>SETHASH</code> function<br /> | ||
| + | [[#FN-DEF-SEVENTH|]]<code>SEVENTH</code> function<br /> | ||
| + | [[#FN-DEF-SIXTH|]]<code>SIXTH</code> function<br /> | ||
| + | [[#FN-DEF-SLEEP|]]<code>SLEEP</code> function<br /> | ||
| + | [[#FN-DEF-SORT|]]<code>SORT</code> function<br /> | ||
| + | [[#FN-DEF-STABLE-SORT|]]<code>STABLE-SORT</code> function<br /> | ||
| + | [[#FN-DEF-STREAMP|]]<code>STREAMP</code> function<br /> | ||
| + | [[#FN-DEF-STRING|]]<code>STRING</code> function<br /> | ||
| + | [[#FN-DEF-STRING-CAPITALIZE|]]<code>STRING-CAPITALIZE</code> function<br /> | ||
| + | [[#FN-DEF-STRING-DOWNCASE|]]<code>STRING-DOWNCASE</code> function<br /> | ||
| + | [[#FN-DEF-STRING-EQUAL|]]<code>STRING-EQUAL</code> function<br /> | ||
| + | [[#FN-DEF-STRING-GREATERP|]]<code>STRING-GREATERP</code> function<br /> | ||
| + | [[#FN-DEF-STRING-LEFT-TRIM|]]<code>STRING-LEFT-TRIM</code> function<br /> | ||
| + | [[#FN-DEF-STRING-LESSP|]]<code>STRING-LESSP</code> function<br /> | ||
| + | [[#FN-DEF-STRING-NOT-EQUAL|]]<code>STRING-NOT-EQUAL</code> function<br /> | ||
| + | [[#FN-DEF-STRING-NOT-GREATERP|]]<code>STRING-NOT-GREATERP</code> function<br /> | ||
| + | [[#FN-DEF-STRING-NOT-LESSP|]]<code>STRING-NOT-LESSP</code> function<br /> | ||
| + | [[#FN-DEF-STRING-RIGHT-TRIM|]]<code>STRING-RIGHT-TRIM</code> function<br /> | ||
| + | [[#FN-DEF-STRING-TRIM|]]<code>STRING-TRIM</code> function<br /> | ||
| + | [[#FN-DEF-STRING-UPCASE|]]<code>STRING-UPCASE</code> function<br /> | ||
| + | [[#FN-DEF-STRING/=|]]<code>STRING/=</code> function<br /> | ||
| + | [[#FN-DEF-427203732|]]<code>STRING<</code> function<br /> | ||
| + | [[#FN-DEF-994985164|]]<code>STRING<=</code> function<br /> | ||
| + | [[#FN-DEF-STRING=|]]<code>STRING=</code> function<br /> | ||
| + | [[#FN-DEF-427203988|]]<code>STRING></code> function<br /> | ||
| + | [[#FN-DEF-995017932|]]<code>STRING>=</code> function<br /> | ||
| + | [[#FN-DEF-STRINGP|]]<code>STRINGP</code> function<br /> | ||
| + | [[#FN-DEF-SUBLIS|]]<code>SUBLIS</code> function<br /> | ||
| + | [[#FN-DEF-SUBSEQ|]]<code>SUBSEQ</code> function<br /> | ||
| + | [[#FN-DEF-SUBSETP|]]<code>SUBSETP</code> function<br /> | ||
| + | [[#FN-DEF-SUBST|]]<code>SUBST</code> function<br /> | ||
| + | [[#FN-DEF-SUBST-IF|]]<code>SUBST-IF</code> function<br /> | ||
| + | [[#FN-DEF-SUBSTITUTE|]]<code>SUBSTITUTE</code> function<br /> | ||
| + | [[#FN-DEF-SUBSTITUTE-IF|]]<code>SUBSTITUTE-IF</code> function<br /> | ||
| + | [[#FN-DEF-SXHASH|]]<code>SXHASH</code> function<br /> | ||
| + | [[#FN-DEF-SYMBOL-FUNCTION|]]<code>SYMBOL-FUNCTION</code> function<br /> | ||
| + | [[#FN-DEF-SYMBOL-NAME|]]<code>SYMBOL-NAME</code> function<br /> | ||
| + | [[#FN-DEF-SYMBOL-PLIST|]]<code>SYMBOL-PLIST</code> function<br /> | ||
| + | [[#FN-DEF-SYMBOL-VALUE|]]<code>SYMBOL-VALUE</code> function<br /> | ||
| + | [[#FN-DEF-SYMBOLP|]]<code>SYMBOLP</code> function | ||
| + | |||
| + | ==== T ==== | ||
| + | |||
| + | <br /> | ||
| + | [[#FN-DEF-TAILP|]]<code>TAILP</code> function<br /> | ||
| + | [[#FN-DEF-TENTH|]]<code>TENTH</code> function<br /> | ||
| + | [[#FN-DEF-TERPRI|]]<code>TERPRI</code> function<br /> | ||
| + | [[#FN-DEF-THIRD|]]<code>THIRD</code> function<br /> | ||
| + | [[#FN-DEF-THROW|]]<code>THROW</code> function<br /> | ||
| + | [[#FN-DEF-TIME-FROM-NOW|]]<code>TIME-FROM-NOW</code> function<br /> | ||
| + | [[#FN-DEF-TIME-HAS-ARRIVED?|]]<code>TIME-HAS-ARRIVED?</code> function<br /> | ||
| + | [[#FN-DEF-TIMESTRING|]]<code>TIMESTRING</code> function<br /> | ||
| + | [[#FN-DEF-TREE-EQUAL|]]<code>TREE-EQUAL</code> function<br /> | ||
| + | [[#FN-DEF-TRUNCATE|]]<code>TRUNCATE</code> function | ||
| + | |||
| + | ==== U ==== | ||
<br /> | <br /> | ||
[[#FN-DEF-UNION|]]<code>UNION</code> function<br /> | [[#FN-DEF-UNION|]]<code>UNION</code> function<br /> | ||
| − | [[#FN-DEF-UNREAD-CHAR|]]<code>UNREAD-CHAR</code> function<br /> | + | [[#FN-DEF-UNREAD-CHAR|]]<code>UNREAD-CHAR</code> function<br /> |
| − | [[#FN-DEF-UPPER-CASE-P|]]<code>UPPER-CASE-P</code> function<br /> | + | [[#FN-DEF-UPPER-CASE-P|]]<code>UPPER-CASE-P</code> function<br /> |
| − | [[#FN-DEF-USER-CONFIRM|]]<code>USER-CONFIRM</code> function | + | [[#FN-DEF-USER-CONFIRM|]]<code>USER-CONFIRM</code> function |
| − | + | ||
| − | ==== V ==== | + | ==== V ==== |
| − | + | ||
| − | <br /> | + | <br /> |
| − | [[#FN-DEF-VALUES|]]<code>VALUES</code> function<br /> | + | [[#FN-DEF-VALUES|]]<code>VALUES</code> function<br /> |
| − | [[#FN-DEF-VARIABLE-INFORMATION|]]<code>VARIABLE-INFORMATION</code> function<br /> | + | [[#FN-DEF-VARIABLE-INFORMATION|]]<code>VARIABLE-INFORMATION</code> function<br /> |
| − | [[#FN-DEF-VECTOR|]]<code>VECTOR</code> function<br /> | + | [[#FN-DEF-VECTOR|]]<code>VECTOR</code> function<br /> |
| − | [[#FN-DEF-VECTORP|]]<code>VECTORP</code> function[[|]] | + | [[#FN-DEF-VECTORP|]]<code>VECTORP</code> function |
| − | + | ||
| − | ==== | + | ==== W ==== |
| + | |||
| + | <br /> | ||
| + | [[#FN-DEF-WARN|]]<code>WARN</code> macro<br /> | ||
| + | [[#FN-DEF-WITH-BINARY-FILE|]]<code>WITH-BINARY-FILE</code> macro<br /> | ||
| + | [[#FN-DEF-WITH-STATIC-AREA|]]<code>WITH-STATIC-AREA</code> macro<br /> | ||
| + | [[#FN-DEF-WITH-TEXT-FILE|]]<code>WITH-TEXT-FILE</code> function<br /> | ||
| + | [[#FN-DEF-WRITE|]]<code>WRITE</code> function<br /> | ||
| + | [[#FN-DEF-WRITE-BYTE|]]<code>WRITE-BYTE</code> function<br /> | ||
| + | [[#FN-DEF-WRITE-CHAR|]]<code>WRITE-CHAR</code> function<br /> | ||
| + | [[#FN-DEF-WRITE-IMAGE|]]<code>WRITE-IMAGE</code> function<br /> | ||
| + | [[#FN-DEF-WRITE-LINE|]]<code>WRITE-LINE</code> function<br /> | ||
| + | [[#FN-DEF-WRITE-STRING|]]<code>WRITE-STRING</code> function<br /> | ||
| + | [[#FN-DEF-WRITE-TO-STRING|]]<code>WRITE-TO-STRING</code> function | ||
| + | |||
| + | ==== X ==== | ||
| + | |||
| + | |||
| + | |||
| + | ==== Y ==== | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
==== Z ==== | ==== Z ==== | ||
Latest revision as of 19:39, 7 February 2020
Homepage
SubL Reference Last Update: 03/28/2002 Copyright© 1996-2002 Cycorp. All rights reserved. How to Use this Document SubL is a computer language built by members of Cycorp. SubL was written to support the Cyc® application, allowing it to run both under Lisp environments and as a C application generated by a SubL-to-C translator. This document describes the primitive functions of SubL. Due to the close similarities between SubL and Common Lisp, the Table of Contents and structure of this document intentionally mirror that of
"Common Lisp: The Language",
2nd Edition,
Guy L. Steele Jr
making it easy to compare and contrast the two languages. For the most part, this document focuses only on the differences between SubL and Common Lisp.
An online version of "Common Lisp: The Language" can be found at
http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/clm.html
http://www.supelec.fr/docs/cltl/clm/clm.htmlor an index to all Common Lisp functions was found at http://web.archive.org/web/20060325065433/http://www.supelec.fr/docs/cltl/clm/index.html original link (non-working in 2019) was:http://www.supelec.fr/docs/cltl/clm/index.html
Each section of this document contains a link labelled "CLtL2 Reference" to the corresponding sections of the above online Common Lisp reference. The reader is strongly encouraged to consult that reference in parallel with this document.
Contents
- 1 1 : Introduction
- 2 2 : Data Types
- 3 3 : Scope and Extent
- 4 4 : Type Specifiers
- 5 5 : Program Structure
- 6 6 : Predicates
- 7 7 : Control Structure
- 7.1 7.1.1 : Reference
- 7.2 7.1.2 : Assignment
- 7.3 7.2 : Generalized Variables
- 7.4 7.3 : Function Invocation
- 7.5 7.4 : Simple Sequencing
- 7.6 7.5 : Establishing New Variable Bindings
- 7.7 7.6 : Conditionals
- 7.8 7.7 : Blocks and Exits
- 7.9 7.8.2 : General Iteration
- 7.10 7.8.3 : Simple Iteration Constructs
- 7.11 7.8.4 : Mapping
- 7.12 7.10.1 : Constructs for Handling Multiple Values
- 7.13 7.10.2 : Rules Governing the Passing of Multiple Values
- 7.14 7.11 : Dynamic Non-Local Exits
- 8 8 : Macros
- 9 9 : Declarations
- 10 10 : Symbols
- 11 11 : Packages
- 12 12 : Numbers
- 12.1 12.2 : Predicates on Numbers
- 12.2 12.3 : Comparisons on Numbers
- 12.3 12.4 : Arithmetic Operations
- 12.4 12.5 : Irrational and Transcendental Functions
- 12.5 12.6 : Type Conversions and Component Extractions on Numbers
- 12.6 12.7 : Logical Operations on Numbers
- 12.7 12.8 : Byte Manipulation Functions
- 12.8 12.9 : Random Numbers
- 12.9 12.10 : Implementation Parameters
- 13 13 : Characters
- 14 14 : Sequences
- 15 15 : Lists
- 16 16 : Hash Tables
- 17 17 : Arrays
- 18 18 : Strings
- 19 19 : Structures
- 20 20 : The Evaluator
- 21 21 : Streams
- 22 22 : Input/Output
- 22.1 22.1 : Printed Representation of SubL Objects
- 22.1.1 22.1.3 : Macro Characters
- 22.1.2 22.1.4 : Standard Dispatching Macro Character Syntax
- 22.1.3 22.1.5 : The Readtable
- 22.1.4 22.1.6 : What the Print Function Produces
- 22.1.5 22.2.1 : Input from Character Streams
- 22.1.6 22.2.2 : Input from Binary Streams
- 22.1.7 22.3.1 : Output to Character Streams
- 22.1.8 22.3.2 : Output to Binary Streams
- 22.1.9 22.3.3 : Formatted Output to Character Streams
- 22.1 22.1 : Printed Representation of SubL Objects
- 23 23 : File System Interface
- 24 24 : Errors
- 25 25 : Miscellaneous Features
- 26 26. Loop
- 27 27. Pretty Printing
- 28 28 : Common Lisp Object System
- 29 SubL-Specific Features
- 30 Index
1 : Introduction
SubL is a programming language intended to be very similar to a simplified version of Common Lisp where those features that are either complex, rarely-used, or difficult to implement in a prodecural language have been excised.
Unlike Common Lisp, SubL is not a purely functional language. Several SubL constructs can only be used procedurally. In order to emphasize this difference, the following naming convention for SubL constructs is used:
A SubL function will have the same name as the analogous Common Lisp function if it is intended to have the exact same basic functionality. The argument list may be simplified, but the intent and use are likely to be the same.
If there is a substantial behavioral difference between a SubL function and its Common Lisp counterpart, its name will be the Common Lisp name prepended with a single character -- either "c", "p" or "f".
"c" indicates a construct that is either only procedural or functional.
"p" indicates the procedural version of a Common Lisp construct.
"f" indicates the functional version of a Common Lisp construct.
A procedural construct in SubL is one which is suitable for evaluation as either one form in an explicit PROGN or as one form in an implicit progn, which occur in the &body; sections of many of the procedural forms such as CLET, PWHEN, CDOLIST etc.
Here is a table of all the procedural constructs in SubL and the Common Lisp analog:
| SubL Procedural Construct | Common Lisp Equivalent | PROGN |
progn
|
PIF |
if
|
PWHEN |
when
|
PUNLESS |
unless
|
PCOND |
cond
|
PCASE |
case
|
CSETQ |
setq
|
CSETF |
setf
|
CINC |
incf
|
CDEC |
decf
|
CPUSH |
push
|
CPUSHNEW |
pushnew
|
CPOP |
pop
|
CLET |
let*
|
CMULTIPLE-VALUE-BIND |
multiple-value-bind
|
CDO |
do*
|
CDOLIST |
dolist
|
CSOME |
CDOTIMES |
dotimes
|
CDOHASH |
CCATCH |
catch
|
CUNWIND-PROTECT |
unwind-protect
|
RET |
return-from
|
A functional construct in SubL is one which returns a value. Here is a table of all the functional constructs in SubL and the Common Lisp analog:
| SubL Functional Construct | Common Lisp Equvalent | CAND |
and
|
COR |
or
|
CNOT |
not
|
FIF |
if
|
FWHEN |
when
|
FUNLESS |
unless
|
|---|
The body of a function or macro definition is considered an implicit progn, and so all forms in the body should be procedural. A function call can be used as a procedural construct. In this case, the returned value is simply ignored.
2 : Data Types
SubL has a flat type heirarchy. Each type is described in more detail in the sections about the methods for that particular type.
SubL supports these built-in Common Lisp datatypes:
| Numbers: | fixnum |
| float | |
| Symbols: | symbol |
| Lists: | cons |
| Arrays: | vector |
| Characters: | character |
| Strings: | string |
| Hashtables: | eq hashtable |
| eql hashtable | |
| equal hashtable | |
| equalp hashtable | |
| Streams: | stream |
| Functions: | function |
SubL does not support these Common Lisp datatypes:
| Multi-dimensional arrays | Packages | Pathnames | Random-states | Lambda-Expressions or Closures |
SubL has only special-case support for these datatypes:
| Readtables: | SubL only supports a single internal readtable |
New data types can be introduced via DEFSTRUCT.
3 : Scope and Extent
Special variables in SubL are all (and only) those variables defined globally with DEFVAR or DEFPARAMETER. In addition, the name of each special variable must begin and end with an asterisk character : '*'.
Special variables have indefinite scope and dynamic extent. All other variables have lexical scope and dynamic extent
Variables are introduced via:
- Function call
- A new set of variables for the formal parameters of the function are introduced. The extent of the function arguments is the duration of the function invocation.
-
CLET,CMULTIPLE-VALUE-BIND,CDESTRUCTURING-BIND - These constructs explicitly introduce and initialize new local variables. The extent of these variables is until exit from the constuct.
-
CDO,CDOLIST,CSOME,CDOTIMES,CDOHASH - These iteration constructs explicitly introduce and update local variables which represent the state of the iteration. The extent of these variables is until exit from the iteration construct.
When a local variable is introduced with the same name as a local variable which is already within the current scope and extent, the new variable shadows the outer variable.
The initialization of a local variable is considered to occur within the scope of the new local variable. Consequently, a variable which is shadowing an outer variable cannot be initialized in terms of the outer value. For example, this is not allowed :
(define foo (x)
(clet ((x (+ x 1)))
(print x))
(ret nil))
However, if the variable is a special variable, the CLET is actually introducing a binding for the special variable, not introducing a new local variable. In this case, the initialization of the binding can be a function of its current value for the variable being bound. For example, this is allowed:
(defvar *some-var* 1)
(define foo (x)
(clet ((*some-var* (+ *some-var* x)))
(print *some-var*))
(ret nil))
The construct RET must be used for a function or macro definition to return its intended result.
4 : Type Specifiers
- SubL does not support type specifiers.
5 : Program Structure
- Program structure in SubL mirrors that of Common Lisp almost exactly. All objects except lists and symbols are self-evaluating. This includes numbers, characters, strings, vectors and hashtables.
- In addition :
- Keyword symbols are self-evaluating.
- The symbols T and NIL are self-evaluating.
5.3.1 : Defining Named Functions
- macro
DEFINE : (name arglist &body body) - All functions in SubL must be named and therefore defined via the SubL construct
DEFINE. See also the similar constructDEFPOLYMORPHICwhich is used to define generic functions which switch off the type of the first argument.
- Argument lists for user-defined function can only be of this form:
( {var}* [&optional; {var | ( var [initform [supplied-var]] ) }*] )
- In short, SubL supports
&optional;arguments for user-defined functions but does not support&keyword;,&aux;or&rest;arguments for user-defined functions.
- In short, SubL supports
5.3.2 : Declaring Global Variables and Named Constants
- macro
DEFVAR : (variable &optional initialization documentation)
- macro
DEFPARAMETER : (variable initialization &optional documentation)
-
DEFVARandDEFPARAMETERare the SubL constructs used to define global variables. The name of each variable must begin and end with an asterisk. - SubL enforces an important distinction between these two constructs, which is described in greater detail under
WRITE-IMAGE.
- macro
DEFCONSTANT : (variable initialization &optional documentation)
- As with
DEFVARandDEFPARAMETER, the name of each named constant defined viaDEFCONSTANTmust begin and end with an asterisk.
6 : Predicates
6.1 : Logical Values
- The symbols NIL and T are used to represent the logical values "true" and "false" in SubL and behave exactly as they do in Common Lisp.
6.2.2 : Specific Data Type Predicates
- For the most part, the following predicates which check for specific data types behave exactly as they do in Common Lisp.
function NULL : (x) |
Same as Common Lisp | function SYMBOLP : (x) |
Same as Common Lisp | function ATOM : (x) |
Same as Common Lisp | function CONSP : (x) |
Same as Common Lisp | function LISTP : (x) |
Same as Common Lisp | function NUMBERP : (x) |
Same as Common Lisp | function INTEGERP : (x) |
Same as Common Lisp | function FLOATP : (x) |
Same as Common Lisp | function CHARACTERP : (x) |
Same as Common Lisp | function STRINGP : (x) |
Same as Common Lisp | function VECTORP : (x) |
Same as Common Lisp | function FUNCTIONP : (x) |
Follows the CLtL2 implementation | function FUNCTION-SPEC-P : (x) |
Returns T IFF x is an object suitable for FUNCALL |
In SubL, FUNCTIONP only returns T if its argument is a function object. The function FUNCTION-SPEC-P returns T if its argument is suitable for FUNCALL or APPLY.
6.3 : Equality Predicates
The SubL equality predicates behave exactly like their Common Lisp counterparts.
- function
EQ : (x y)
- function
EQL : (x y)
- function
EQUAL : (x y)
- function
EQUALP : (x y)
6.4 : Logical Operators
- SubL logical operations only return T or NIL. Otherwise, they behave like their Common Lisp counterparts.
- macro
CNOT : (x)
- macro
CAND : (&rest args)
- macro
COR : (&rest args)
7 : Control Structure
7.1.1 : Reference
These SubL constructs behave exactly like their Common Lisp counterparts.
- function
QUOTE : (data)
- macro
FUNCTION : (fspec)
- function
SYMBOL-VALUE : (x)
- function
SYMBOL-FUNCTION : (x)
- function
BOUNDP : (x)
- function
FBOUNDP : (x)
7.1.2 : Assignment
- macro
CSETQ : (var value &rest var-val-pairs)
- Since
CSETQis procedural in SubL, it does not return a value. - Otherwise, it behaves just like
setqin Common Lisp.
These SubL functions for setting and unsetting symbol properties behave like their Common Lisp counterparts.
- function
SET : (symbol value)
- function
MAKUNBOUND : (symbol)
- function
FMAKUNBOUND : (symbol)
7.2 : Generalized Variables
- macro
CSETF : (place val) -
CSETFis a more restricted version ofsetfin Common Lisp. First, since it is procedural, likeCSETQit does not return a value. Second, there is a much more restricted set of place-specifiers which are allowable.
Here is a complete table of the allowable CSETF forms, and their equivalent SubL expansions:
| CSETF form | Equivalent SubL expansion | (CSETF variable value) |
(CSETQ variable value)
|
(CSETF (AREF vector n) value ) |
(SET-AREF vector n value)
|
(CSETF (NTH n list) value) |
(SET-NTH n list value)
|
(CSETF (CAR cons) value) |
(RPLACA cons value)
|
(CSETF (CDR cons) value) |
(RPLACD cons value)
|
(CSETF (GET symbol indicator) value) |
(PUT symbol indicator value)
|
(CSETF (GETHASH key hashtable) value) |
(SETHASH key hashtable value)
|
(CSETF (SYMBOL-VALUE symbol) value) |
(SET symbol value)
|
(CSETF (defstruct-slot object) value) |
(set-defstruct-slot object value)
|
In the above table, defstruct-slot refers to any structure slot accessor function which got defined via defstruct, and set-defstruct-slot refers to the corresponding setter function for the given accessor.
7.3 : Function Invocation
These functions behave like their Common Lisp counterparts.
- function
APPLY : (function argument &rest arguments)
- function
FUNCALL : (function &rest args)
The first argument to both APPLY and FUNCALL must satisfy FUNCTION-SPEC-P.
7.4 : Simple Sequencing
- macro
PROGN : (&body body) - In SubL,
PROGNis procedural and therefore does not return a value. Since it is intended to be essentially procedural in Common Lisp as well, the same name is used even though they have slightly different semantics.
7.5 : Establishing New Variable Bindings
- macro
CLET : (bindings &body body) - The SubL construct
CLETcan be used to introduce new local variables or bind special variables. The variables are initialized in order just likeLET*in Common Lisp. Since it is procedural, it does not return a value.
SubL has no counterpart to Common Lisp's LET construct.
- macro
CPROGV : (special-vars bindings &body body) -
CPROGVis procedural and therefore does not return a value. Otherwise, it is equivalent toprogvin Common Lisp.
7.6 : Conditionals
- macro
PIF : (condition action else-action)
- macro
PWHEN : (condition &body body)
- macro
PUNLESS : (condition &body body)
PIF, PWHEN and PUNLESS are the SubL procedural variants of if, when and unless from Common Lisp. For each, the condition argument must be a functional construct. Also, PIF takes exactly three arguments, making the action and else-actions identical in form.
- macro
FIF : (condition true-value false-value)
- macro
FWHEN : (condition true-value)
- macro
FUNLESS : (condition false-value)
FIF, FWHEN and FUNLESS are the SubL functional variants of if, when and unless from Common Lisp.
- macro
PCOND : (&rest clauses)
- macro
PCASE : (test-object &body clauses)
7.7 : Blocks and Exits
- macro
RET : (expression) - SubL functions must always return a value, since C functions must return values and all SubL functions must translate into C (Java).
-
RETis used to return a value from a function or macro definition. All functions and macro definitions behave as if an implicit - (ret nil)
- appears at the very end of each function.
7.8.2 : General Iteration
- macro
CDO : (vars endtest &body body) - cdo is procedural. It binds its variables in sequence, as with CommonLisp do*
7.8.3 : Simple Iteration Constructs
- macro
CDOLIST : ((var listform) &body body)
- macro
CSOME : ((var list endvar) &body body)
- macro
CDOTIMES : ((var integer) &body body)
- macro
CDOHASH : ((key val table) &body body)
7.8.4 : Mapping
- function
MAPCAR : (function list &rest more-lists)
- function
MAPLIST : (function list &rest more-lists)
- function
MAPC : (function list &rest more-lists)
- function
MAPL : (function list &rest more-lists)
- function
MAPCAN : (function list &rest more-lists)
- function
MAPCON : (function list &rest more-lists)
7.10.1 : Constructs for Handling Multiple Values
- function
VALUES : (value &rest more-values) - values returns its args such that they can be bound in a dynamically enclosing multiple-value-bind. The first value is returned as well, since all SubL functions must return a value.
- variable
*MULTIPLE-VALUES-LIMIT*
- macro
MULTIPLE-VALUE-LIST : (form)
- macro
CMULTIPLE-VALUE-BIND : (vars value &body body)
7.10.2 : Rules Governing the Passing of Multiple Values
In SubL, multiple values are governed the same way that they are in Common Lisp, except that if ANY of the return statements in your function are (values ...) then all of them must be.
7.11 : Dynamic Non-Local Exits
- macro
CCATCH : (tag ans-var &body body) - ccatch is procedural, and so does not return values.
- macro
CUNWIND-PROTECT : (protected-form &body body)
- function
THROW : (tag result)
8 : Macros
8.1 : Macro Definition
- macro
DEFMACRO : (name pattern &body body) - SubL Macros are expanded at translation-time. Full Common Lisp macro support is available. However, the macro-expander must use
RETto return the expansion.
8.3 : Destructuring
- macro
CDESTRUCTURING-BIND : (pattern datum &body body)
8.5 : Environments
- function
VARIABLE-INFORMATION : (variable)
- function
FUNCTION-INFORMATION : (function)
9 : Declarations
9.1 : Declaration Syntax
- function
DECLARE : (&rest ignore)
- function
PROCLAIM : (declaration-specifier)
- macro
DECLAIM : (&rest declaration-specifiers)
9.2 : Declaration Specifiers
- function
IGNORE : (&rest values) - The
IGNOREfunction can be used to indicate that a particular variable's value is not used.
10 : Symbols
- function
SYMBOLP : (x)
10.1 : The Property List
- function
GET : (symbol indicator &optional default)
- function
PUT : (symbol indicator new-value)
- function
REMPROP : (symbol indicator)
- function
SYMBOL-PLIST : (symbol)
10.2 : The Print Name
- function
SYMBOL-NAME : (symbol) - Returns the string which is the name of SYMBOL. When called on a keyword, it returns the ":" prefix as part of the name
10.3 : Creating Symbols
- function
MAKE-SYMBOL : (print-name)
- function
GENSYM : (&optional x) - GENSYM returns new, interned symbols, which are combinations of a string prefix and a numeric suffix. It guarantees that the new symbol was not previously interned.
- If the argument X is a number, the gensym counter (used to generate the suffix) is set to X before the new symbol is generated.
- if the argument X is a string, the gensym prefix is set to X before the new symbol is generated.
- The initial gensym counter value is 1 and the initial gensym prefix is 'G'.
- function
GENTEMP : (&optional (prefix "T"))
- function
KEYWORDP : (x) - In SubL, which does not have packages, keywords are any symbol whose name begins with ":"
11 : Packages
- macro
IN-PACKAGE : (name)
- function
INTERN : (string) - Finds and returns a symbol whose name is STRING. INTERN will create the symbol if it does not exist. Unlike Common LISP intern, the SubL version does not allow an argument to specify the package, since SubL does not support packages.
- function
FIND-SYMBOL : (string) - Finds and returns a symbol whose name is STRING. Unlike Common LISP FIND-SYMBOL, the SubL version does not allow an argument to specify the package, since SubL does not support packages.
12 : Numbers
SubL only supports fixnums and floats. Fixnums have at least 28 bits of precision.
- function
NUMBERP : (x)
- function
FIXNUMP : (x)
- function
INTEGERP : (x)
- function
FLOATP : (x)
12.2 : Predicates on Numbers
- function
ZEROP : (x)
- function
PLUSP : (x)
- function
MINUSP : (x)
- function
ODDP : (x)
- function
EVENP : (x)
12.3 : Comparisons on Numbers
- function
= : (num1 num2)
- function
/= : (num1 num2)
- function
< : (num1 num2)
- function
> : (num1 num2)
- function
<= : (num1 num2)
- function
>= : (num1 num2)
The above numeric comparison functions take exactly 2 arguments, unlike their Common Lisp counterparts which take variable numbers of arguments.
- function
MAX : (num &rest numbers)
- function
MIN : (num &rest numbers)
12.4 : Arithmetic Operations
- function
+ : (&rest numbers)
- function
- : (num &rest numbers)
- function
* : (&rest numbers)
- function
/ : (num &rest numbers)
- function
INT/ : (num1 num2)
- macro
CINC : (place &optional (delta 1))
- macro
CDEC : (place &optional (delta 1))
12.5 : Irrational and Transcendental Functions
SubL does not currently support any irrational, transcendental or trigonometric functions.
12.6 : Type Conversions and Component Extractions on Numbers
- function
FLOAT : (x)
- function
FLOOR : (x)
- function
CEILING : (x)
- function
TRUNCATE : (x)
- function
ROUND : (x)
- function
MOD : (number divisor)
- function
REM : (number divisor)
- function
SCALE-FLOAT : (float integer)
- function
INTEGER-DECODE-FLOAT : (float)
12.7 : Logical Operations on Numbers
SubL does not currently support any logical operations on numbers.
12.8 : Byte Manipulation Functions
- macro
BYTE : (size position)
- function
LDB : (bytespec integer)
- function
DPB : (newbyte bytespec integer)
12.9 : Random Numbers
- variable
*RAND-MAX* - *rand-max* is the largest fixnum that the function random can accept.
- function
SEED-RANDOM : (&optional (seed-fixnum (mod (get-internal-real-time) *rand-max*))) - If seed-fixnum is omitted to seed-random, the internal clock is used
- in an implementation specific manner.
- function
RANDOM : (number)
12.10 : Implementation Parameters
- variable
*MOST-POSITIVE-FIXNUM*
- variable
*MOST-NEGATIVE-FIXNUM*
13 : Characters
- function
CHARACTERP : (x)
13.1 : Character Attributes
SubL does not currently support any attributes for characters. A character exists for each ASCII character code between 0 and 255 inclusive. Thus, the SubL equivalent of Common Lisp's CHAR-CODE-LIMIT is 256.
13.2 : Predicates on Characters
- function
ALPHA-CHAR-P : (char)
- function
UPPER-CASE-P : (char)
- function
LOWER-CASE-P : (char)
- function
BOTH-CASE-P : (char)
- function
DIGIT-CHAR-P : (char)
- function
ALPHANUMERICP : (char)
- function
CHAR= : (char1 char2)
- function
CHAR/= : (char1 char2)
- function
CHAR< : (char1 char2)
- function
CHAR> : (char1 char2)
- function
CHAR<= : (char1 char2)
- function
CHAR>= : (char1 char2)
- function
CHAR-EQUAL : (char1 char2)
- function
CHAR-NOT-EQUAL : (char1 char2)
- function
CHAR-LESSP : (char1 char2)
- function
CHAR-GREATERP : (char1 char2)
- function
CHAR-NOT-GREATERP : (char1 char2)
- function
CHAR-NOT-LESSP : (char1 char2)
13.3 : Character Construction and Selection
- function
CHAR-CODE : (char)
- function
CODE-CHAR : (code)
13.4 : Character Conversions
- function
CHAR-DOWNCASE : (char)
- function
CHAR-UPCASE : (char)
14 : Sequences
- function
SEQUENCEP : (x)
14.1 : Simple Sequence Functions
- function
ELT : (sequence index)
- function
SUBSEQ : (sequence start &optional end)
- function
COPY-SEQ : (sequence)
- function
LENGTH : (sequence)
- function
REVERSE : (sequence)
- function
NREVERSE : (sequence)
14.2 : Concatenating, Mapping and Reducing Sequences
- function
CCONCATENATE : (seq &rest more-seqs)
- function
CREDUCE : (function sequence &optional (start 0) end (init-value :none))
14.3 : Modifying Sequences
- function
FILL : (sequence item &optional (start 0) (end (length sequence)))
- function
REPLACE : (sequence1 sequence2 &optional (start1 0) end1 (start2 0) end2)
- function
REMOVE : (item sequence &optional (test #'eql) (key #'identity) (start 0) end count)
- function
REMOVE-IF : (test sequence &optional (key #'identity) (start 0) end count)
- function
DELETE : (item sequence &optional (test #'eql) (key #'identity) (start 0) end count)
- function
DELETE-IF : (test sequence &optional (key #'identity) (start 0) end count)
- function
REMOVE-DUPLICATES : (sequence &optional (test #'eql) (key #'identity) (start 0) end)
- function
DELETE-DUPLICATES : (sequence &optional (test #'eql) (key #'identity) (start 0) end)
- function
SUBSTITUTE : (new old sequence &optional (test #'eql) (key #'identity) (start 0) end count)
- function
SUBSTITUTE-IF : (new test sequence &optional (key #'identity) (start 0) end count)
- function
NSUBSTITUTE : (new old sequence &optional (test #'eql) (key #'identity) (start 0) end count)
- function
NSUBSTITUTE-IF : (new test sequence &optional (key #'identity) (start 0) end count)
14.4 : Searching Sequences for Terms
- function
FIND : (item seq &optional (test #'eql) (key #'identity) (start 0) end)
- function
FIND-IF : (test seq &optional (key #'identity) (start 0) end)
- function
POSITION : (item seq &optional (test #'eql) (key #'identity) (start 0) end)
- function
POSITION-IF : (test seq &optional (key #'identity) (start 0) end)
- function
COUNT : (item seq &optional (test #'eql) (key #'identity) (start 0) end)
- function
COUNT-IF : (test seq &optional (key #'identity) (start 0) end)
- function
MISMATCH : (seq1 seq2 &optional (test #'eql) (key #'identity) (start1 0) end1 (start2 0) end2)
- function
SEARCH : (seq1 seq2 &optional (test #'eql) (key #'identity) (start1 0) end1 (start2 0) end2)
14.5 : Sorting and Merging
- function
SORT : (seq predicate &optional (key #'identity))
- function
STABLE-SORT : (seq predicate &optional (key #'identity))
- function
CMERGE : (seq1 seq2 predicate &optional (key #'identity))
15 : Lists
- function
LISTP : (x)
- function
CONSP : (x)
- function
ATOM : (x)
15.1 : Conses
- function
CAR : (cons)
- function
CDR : (cons)
- function
CAAR : (cons)
- function
CADR : (cons)
- function
CDAR : (cons)
- function
CDDR : (cons)
- function
CONS : (car cdr)
- function
TREE-EQUAL : (tree1 tree2 &optional (test #'eql))
15.2 : Lists
- function
ENDP : (object)
- function
LIST-LENGTH : (list)
- function
NTH : (n list)
- function
FIRST : (list)
- function
SECOND : (list)
- function
THIRD : (list)
- function
FOURTH : (list)
- function
FIFTH : (list)
- function
SIXTH : (list)
- function
SEVENTH : (list)
- function
EIGHTH : (list)
- function
NINTH : (list)
- function
TENTH : (list)
- function
REST : (list)
- function
NTHCDR : (n list)
- function
LAST : (list &optional (n 1))
- function
LIST : (&rest objects)
- function
LIST* : (arg &rest objects)
- function
MAKE-LIST : (size &optional initial-element)
- function
APPEND : (&rest lists)
- function
COPY-LIST : (list)
- function
COPY-ALIST : (list)
- function
COPY-TREE : (tree)
- function
REVAPPEND : (list1 list2)
- function
NCONC : (&rest lists)
- function
NRECONC : (list1 list2)
- macro
CPUSH : (item place)
- macro
CPUSHNEW : (item place &optional (test '#'eql) (key '#'identity))
- macro
CPOP : (place)
- function
BUTLAST : (list &optional (n 1))
- function
NBUTLAST : (list &optional (n 1))
- function
LDIFF : (list sublist)
15.3 : Alteration of List Structure
- function
RPLACA : (cons newcar)
- function
RPLACD : (cons newcdr)
- function
SET-NTH : (n list value)
15.4 : Substitution of Expressions
- function
SUBST : (new old tree &optional (test #'eql) (key #'identity))
- function
SUBST-IF : (new test tree &optional (key #'identity))
- function
NSUBST : (new old tree &optional (test #'eql) (key #'identity))
- function
NSUBST-IF : (new test tree &optional (key #'identity))
- function
SUBLIS : (alist tree &optional (test #'eql) (key #'identity))
- function
NSUBLIS : (alist tree &optional (test #'eql) (key #'identity))
15.5 : Using Lists as Sets
- function
MEMBER : (item list &optional (test #'eql) (key #'identity))
- function
MEMBER-IF : (test list &optional (key #'identity))
- function
TAILP : (sublist list)
- function
ADJOIN : (item list &optional (test #'eql) (key #'identity))
- function
UNION : (list1 list2 &optional (test #'eql) (key #'identity))
- function
NUNION : (list1 list2 &optional (test #'eql) (key #'identity))
- function
INTERSECTION : (list1 list2 &optional (test #'eql) (key #'identity))
- function
NINTERSECTION : (list1 list2 &optional (test #'eql) (key #'identity))
- function
SET-DIFFERENCE : (list1 list2 &optional (test #'eql) (key #'identity))
- function
NSET-DIFFERENCE : (list1 list2 &optional (test #'eql) (key #'identity))
- function
SET-EXCLUSIVE-OR : (list1 list2 &optional (test #'eql) (key #'identity))
- function
NSET-EXCLUSIVE-OR : (list1 list2 &optional (test #'eql) (key #'identity))
- function
SUBSETP : (list1 list2 &optional (test #'eql) (key #'identity))
15.6 : Association Lists
- function
ACONS : (key datum alist)
- function
PAIRLIS : (keys data &optional alist)
- function
ASSOC : (item alist &optional (test #'eql) (key #'identity))
- function
ASSOC-IF : (predicate alist)
- function
RASSOC : (item alist &optional (test #'eql) (key #'identity))
- function
RASSOC-IF : (predicate alist)
16 : Hash Tables
16.1 : Hash Table Functions
- function
MAKE-HASH-TABLE : (size &optional (test #'eql) (area default-cons-area))
- function
HASH-TABLE-P : (x)
- function
GETHASH : (key table &optional default)
- function
SETHASH : (key table value)
- function
REMHASH : (key table)
- function
MAPHASH : (function table)
- function
CLRHASH : (table)
- function
HASH-TABLE-COUNT : (table)
16.2 : Primitive Hash Function
- function
SXHASH : (object)
17 : Arrays
- SubL only supports one-dimensional arrays, which are called vectors.
function VECTORP : (x)
17.1 : Vector Creation
- function
MAKE-VECTOR : (size &optional initial-element)
- function
VECTOR : (&rest objects)
17.2 : Vector Access
- function
AREF : (vector index)
- function
SET-AREF : (vector index value)
18 : Strings
- function
STRINGP : (x)
18.1 : String Access
- function
CHAR : (string index)
- function
SET-CHAR : (string index value)
18.2 : String Comparison
- function
STRING= : (string1 string2 &optional (start1 0) end1 (start2 0) end2)
- function
STRING-EQUAL : (string1 string2 &optional (start1 0) end1 (start2 0) end2)
- function
STRING< : (string1 string2 &optional (start1 0) end1 (start2 0) end2)
- function
STRING> : (string1 string2 &optional (start1 0) end1 (start2 0) end2)
- function
STRING<= : (string1 string2 &optional (start1 0) end1 (start2 0) end2)
- function
STRING>= : (string1 string2 &optional (start1 0) end1 (start2 0) end2)
- function
STRING/= : (string1 string2 &optional (start1 0) end1 (start2 0) end2)
- function
STRING-LESSP : (string1 string2 &optional (start1 0) end1 (start2 0) end2)
- function
STRING-GREATERP : (string1 string2 &optional (start1 0) end1 (start2 0) end2)
- function
STRING-NOT-GREATERP : (string1 string2 &optional (start1 0) end1 (start2 0) end2)
- function
STRING-NOT-LESSP : (string1 string2 &optional (start1 0) end1 (start2 0) end2)
- function
STRING-NOT-EQUAL : (string1 string2 &optional (start1 0) end1 (start2 0) end2)
18.3 : String Construction and Manipulation
- function
MAKE-STRING : (size &optional (initial-element #\Space))
- function
STRING-TRIM : (char-list string)
- function
STRING-LEFT-TRIM : (char-list string)
- function
STRING-RIGHT-TRIM : (char-list string)
- function
STRING-UPCASE : (string &optional (start 0) end)
- function
STRING-DOWNCASE : (string &optional (start 0) end)
- function
STRING-CAPITALIZE : (string &optional (start 0) end)
- function
NSTRING-UPCASE : (string &optional (start 0) end)
- function
NSTRING-DOWNCASE : (string &optional (start 0) end)
- function
NSTRING-CAPITALIZE : (string &optional (start 0) end)
- function
STRING : (x)
19 : Structures
- macro
DEFSTRUCT : ((name &rest options) &body slots) - Like Common Lisp defstruct except:
- (1) slot initializations are not allowed.
- (2) the only other options:
- (:conc-name whatever)
- (:print-function #'whatever)
- the default structure print function is
- default-struct-print-function : object stream depth
- (:conc-name whatever)
- (3) The make constructor takes no arguments and only makes an empty structure.
- (4) Reading of structures is not supported by the reader.
- function
DEFAULT-STRUCT-PRINT-FUNCTION : (object stream depth)
- macro
PRINTING-OBJECT : ((object stream) &body body)
20 : The Evaluator
20.1 : Run-Time Evaluation of Forms
- function
EVAL : (form)
- function
CONSTANTP : (object &optional env)
- The Common Lisp functions
evalhookandapplyhookare not supported in SubL.
20.2 : The Top-Level Loop
- variable
* - variable
** - variable
*** - For convenience, the top-level readloop binds the following variables after each form is evaluated:
| * | the last value returned | ** | the previous value of * | *** | the previous value of ** |
21 : Streams
- function
STREAMP : (x)
21.1 : Standard Streams
- variable
*STANDARD-INPUT*
- variable
*STANDARD-OUTPUT*
- variable
*ERROR-OUTPUT*
- variable
*NULL-OUTPUT* - A bit-sink output stream. All output is ignored
The other standard streams supported by Common Lisp are not supported by SubL.
21.2 : Creating new Streams
- function
OPEN-TCP-STREAM : (host port)
21.3 : Operations on Streams
- function
STREAMP : (x)
- function
INPUT-STREAM-P : (object)
- function
OUTPUT-STREAM-P : (object)
- function
CLOSE : (stream)
22 : Input/Output
22.1 : Printed Representation of SubL Objects
22.1.3 : Macro Characters
The SubL reader supports the following macro characters, whose meaning is identical to their meaning in Common Lisp :
| Macro Character | Reader Action | ( |
Begin reading a list. | ) |
End reading a list or a vector. | ' |
Read in a quoted expression. | ; |
Read a comment until end-of-line. | " |
Begin or end reading a string. | ` |
Read in a backquoted expression. |
In addition, the following comma-readers are supported inside of backquote :
, ,@ ,.
Their behavior is identical to their Common Lisp counterparts.
22.1.4 : Standard Dispatching Macro Character Syntax
'#' is the SubL standard dispatching macro character. The SubL reader supports the following dispatch macro character sequences, whose meanings are identical to their meanings in Common Lisp :
| Dispatch Sequence | Reader Action | #\( |
Read a character constant. | #' |
Read a function constant. | #( |
Begin reading a vector. | #| |
Begin reading a comment section. | |# |
End reading a comment section. |
Additionally, SubL supports the dispatch sequence #$ as follows :
#$fooreads the Cyc constant whose name is"foo"
22.1.5 : The Readtable
SubL internally uses a readtable, but it is not visible to the programmer.
22.1.6 : What the Print Function Produces
- variable
*PRINT-ESCAPE*
22.2.1 : Input from Character Streams
- function
READ : (&optional (stream *standard-input*) (eof-error-p t) (eof-value :eof)) - Returns FORM if read was successful.
- Returns the values NIL :ERROR if there was a reader error.
- Returns the values EOF-VALUE :ERROR if EOF-ERROR-P is nil and EOF occurs.
- Causes an error if EOF-ERROR-P is not nil and EOF occurs.
Differences from Common Lisp:
`Numbers are only read in decimal notation with no specified radix.\No character modifiers: only standard chars plus specials like Space, Return etc.\The || notation and \\ syntax for symbols are not supported.
- function
READ-LINE : (&optional (stream standard-input) (eof-error-p t) (eof-value :eof))
- function
READ-CHAR : (&optional (stream standard-input) (eof-error-p t) (eof-value :eof))
- function
UNREAD-CHAR : (char &optional (stream standard-input))
- function
READ-FROM-STRING : (string &optional (eof-error-p t) (eof-value :eof) (start 0) end)` - Returns the values FORM NEW-START if read was successful.
- Returns the values NIL :ERROR if there was a reader error.
- Returns the values EOF-VALUE :ERROR if EOF-ERROR-P is nil and EOF occurs.
- Causes an error if EOF-ERROR-P is not nil and EOF occurs.
- Returns a second value which is an integer indicating the position in the string to
- start reading from again or :ERROR if there was some kind of reader error.
22.2.2 : Input from Binary Streams
- function
READ-BYTE : (stream &optional (eof-error-p t) (eof-value :eof))
22.3.1 : Output to Character Streams
- function
WRITE : (object &optional (stream *standard-output*) (escape *print-escape*))
- function
PRIN1 : (object &optional (stream *standard-output*))
- function
PRINT : (object &optional (stream *standard-output*))
- function
PRINC : (object &optional (stream *standard-output*))
- function
WRITE-TO-STRING : (object &optional (escape *print-escape*))
- function
PRIN1-TO-STRING : (object)
- function
PRINC-TO-STRING : (object)
- function
WRITE-CHAR : (char &optional (stream *standard-output*))
- function
WRITE-STRING : (string &optional (stream *standard-output*) (start 0) end)
- function
WRITE-LINE : (string &optional (stream *standard-output*) (start 0) end)
- function
TERPRI : (&optional (stream *standard-output*))
- function
FORCE-OUTPUT : (&optional (stream *standard-output*))
22.3.2 : Output to Binary Streams
- function
WRITE-BYTE : (integer stream)
22.3.3 : Formatted Output to Character Streams
- function
FORMAT : (destination control-string &rest arguments) - Format ARGUMENTS to the text stream DESTINATION according to the specifications in CONTROL-STRING. SubL format is more limited than the Common Lisp version: the only escapes allowed in the control string are:
- ~A
- ~a
- ~S
- ~s
- ~D (with width and pad parameters optional)
- ~d (with width and pad parameters optional)
- ~C
- ~c
- ~G
- ~g
- ~%
- ~~
23 : File System Interface
23.1 : File Names
- variable
*DEFAULT-PATHNAME-DEFAULTS*
- function
CONSTRUCT-FILENAME : (directory-list filename &optional extension relative?)
Pathnames are just strings in SubL. Common Lisp pathname objects are not supported.
23.2 : Opening and Closing Files
- function
OPEN-TEXT : (filename direction) - Attempts to open the file FILENAME. If successful, returns an 8-bit character text stream. If DIRECTION is :input, then input operations can be performed on the stream. If DIRECTION is output, then output is directed to the file FILENAME, overwriting any existing file. If DIRECTION is :append, then output is appended to the file. For either output case, a new file is created if no file named FILENAME already exists.
- function
OPEN-BINARY : (filename direction) - Attempts to open the file FILENAME. If successful, returns an 8-bit binary byte stream. If DIRECTION is :input, then input operations can be performed on the stream. If DIRECTION is output, then output is directed to the file FILENAME, overwriting any existing file. If DIRECTION is :append, then output is appended to the file. For either output case, a new file is created if no file named FILENAME already exists.
- macro
WITH-TEXT-FILE : ((stream filestring direction) &body body) - In the scope of a WITH-TEXT-FILE expression, the file FILESTRING is opened for character i/o and a stream to this file is created and bound to the variable STREAM. If DIRECTION is :input, then input operations can be performed on STREAM. If DIRECTION is :output, then output operations can be performed, overwriting any existing file. If DIRECTION is :append, then output is appended to an existing file.
- macro
WITH-BINARY-FILE : ((stream filestring direction) &body body) - In the scope of a WITH-BINARY-FILE expression, the file FILESTRING is opened for binary i/o and a stream to this file is created and bound to the variable STREAM. If DIRECTION is :input, then input operations can be performed on STREAM. If DIRECTION is :output, then output operations can be performed, overwriting any existing file. If DIRECTION is :append, then output is appended to an existing file.
23.3 : Renaming, Deleting and Other File Operations
- function
RENAME-FILE : (filename new-name)
- function
DELETE-FILE : (filename)
- function
PROBE-FILE : (filename)
- function
APPEND-FILES : (filename-1 filename-2 &optional (mode :text)) - Append filename-1 to filename-2
- function
FILE-WRITE-DATE : (filename)
- function
FILE-AUTHOR : (filename)
- function
GET-FILE-POSITION : (stream)
- function
SET-FILE-POSITION : (stream n)
- function
FILE-LENGTH : (stream)
23.4 : Loading Files
- function
LOAD : (filename)
23.5 : Accessing Directories
- function
DIRECTORY : (directory-name &optional include-directory)
24 : Errors
24.1 : General Error-Signalling Functions
- variable
*ERROR-ABORT-HANDLER* - If *error-abort-handler* is non-nil, then an ABORT option is available inside ERROR and CERROR.
- If chosen, then the handler is funcalled on no arguments.
- variable
*ERROR-HANDLER* - If *ERROR-SIGNAL* is non-nil, then that function is called upon an error. Otherwise, the debugger is invoked.
- variable
*ERROR-MESSAGE*
- function
ERROR : (format-string &rest arguments)
- variable
*CONTINUE-CERROR?*
- function
CERROR : (continue-string format-string &rest arguments)
- variable
*IGNORE-WARNS?* - If T, all warnings forms are ignored
- function
WARN : (format-string &rest arguments)
- variable
*IGNORE-BREAKS?* - If non-NIL, all break forms are ignored
- function
BREAK : (format-string &rest arguments)
24.2 : Specialized Error-Signalling Forms and Macros
- variable
*IGNORE-MUSTS?* - If non-NIL, all must forms are ignored
- macro
MUST : (form format-string &rest arguments)
- variable
*SUSPEND-TYPE-CHECKING?* - CHECK-TYPE tests are performed iff this is non-nil
- macro
CHECK-TYPE : (object pred)
25 : Miscellaneous Features
25.1 : The Compiler
SubL currently does not provide any compilation support.
25.3 : Debugging Tools
- macro
CTIME : (var &body body)
- function
DEBUG : ()
Pauses execution and invokes the debugger.
25.4.1 : Time Functions
- variable
*EPOCH* - *epoch* is the current epoch in use, which is a universal time.
- The system needs to at least be able to handle epochs back to midnight Jan 1 1970.
- *epoch* is globally initialized to midnight Jan 1 1970.
- All universal times are relative to *epoch*.
- The system needs to at least be able to handle epochs back to midnight Jan 1 1970.
- function
GET-UNIVERSAL-TIME : ()
- function
DECODE-UNIVERSAL-TIME : (universal-time)
- function
ENCODE-UNIVERSAL-TIME : (second minute hour date month year)
- function
TIME-FROM-NOW : (delta)
- function
TIME-HAS-ARRIVED? : (time)
- function
ENCODE-TIMESTRING : (second minute hour date month year)
- function
TIMESTRING : (&optional (universal-time (get-universal-time))) - timestring returns a string in the format dd/mm/yy hh:mm:ss from the
- universal time given. If none is given, the current time is used.
- universal time given. If none is given, the current time is used.
- variable
*CLOCK-GRANULARITY* - *clock-granularity* is the number of internal clock units per second.
- time evals form and returns the number of internal clock units it took
- to execute.
- time evals form and returns the number of internal clock units it took
- function
GET-INTERNAL-REAL-TIME : ()
- function
SLEEP : (seconds)
25.5 : Identity Function
- function
IDENTITY : (object)
26. Loop
CLtL2 Reference no information
27. Pretty Printing
CLtL2 Reference no information
28 : Common Lisp Object System
- macro
DEFPOLYMORPHIC : (name lambda-list &body body) - Defines a new polymorphic function that dispatches on the type of its first argument. <body> defines a default method. The function define-method can be used to define additional methods.
For example:
| (defpolymorphic test (a b) (list a b)) | (define-method test ((a cons) b) (cons b a)) | (define-method test ((a fixnum) b) (+ a b)) | The defpolymorphic form defines the function TEST with a default method. The two define-method forms specialize the behavior of TEST for lists and fixnums. |
(test 'foo 'bar) => (FOO BAR) | `(test '(foo) 'bar) => (BAR FOO)\(test 2 3) => 5
|
- macro
DEFINE-METHOD : (name lambda-list &body body) - Defines a method for the polymorphic function <name>
- that runs if <dispatch-arg> is of type <type>.
- The lambda list must have the same structure as in the DEFPOLYMORPHIC call.
SubL-Specific Features
SubL.1 : Signals
- variable
*SIGNAL-MAX*
- There are *signal-max* total signals available.
- function
DEFAULT-SIGNAL-HANDLER : (signal)
- function
INSTALL-SIGNAL-HANDLER : (signal function)
SubL.2 : System Properties
- function
GET-PROCESS-ID : (&optional default) - Return the current heavyweight process id of this current SubL program.
- Return DEFAULT if this cannot be determined.
- function
GET-MACHINE-NAME : (&optional default)
- function
GET-NETWORK-NAME : (&optional default)
- function
GET-USER-NAME : (&optional default)
SubL.3 : Progress Pacifiers
- variable
*SILENT-PROGRESS?*
- macro
NOTING-ACTIVITY : (string &body body)
- function
NOTE-ACTIVITY : ()
- macro
NOTING-NUMERIC-PROGRESS : (string &body body)
- function
NOTE-NUMERIC-PROGRESS : (num)
- macro
NOTING-PERCENT-PROGRESS : (string &body body)
- function
NOTE-PERCENT-PROGRESS : (index max)
SubL.4 : Process Manipulation
- function
FORK-PROCESS : (function &optional callback output-file) - Spawn a heavyweight child process to call FUNCTION, which takes no arguments.
- FUNCTION must return an integer.
- CALLBACK, if provided, must be a function of one argument which is called on the returned value within the address space of the parent process.
- OUTPUT-FILE, if provided, is a file to which standard output and error are piped
while executing FUNCTION.
- function
RESTART-PROCESS : (&optional world-spec init-file-pathname init-form-spec) - Restart the current heavyweight process.
- WORLD-SPEC, if provided, is the filename of a world to use.
- INIT-FILE-PATHNAME, if provided, is a file of initializatio forms to eval.
- INIT-FORM-SPEC, if provided, is a form to execute.
- WORLD-SPEC, if provided, is the filename of a world to use.
- The values used for these when the current process was started are used if unprovided.
SubL.5 : Memory Interaction
- function
GC : (&optional level)
- macro
WITH-STATIC-AREA : (&body body)
- function
WRITE-IMAGE : (filename &optional do-full-gc)
- Save the current state of virtual memory in a file called FILENAME.
- If DO-FULL-GC is true, then a full garbage collection is performed before writing the image.
- Otherwise, a dynamic garbage collection is performed and remaining objects are promoted to being static ones.
- During the initialization of a SubL system at startup, variables defined via
DEFVARhave their initial values set via their state in the world file used at startup, ignoring the initial value specified by the code.DEFPARAMETERvariables andDEFCONSTANTglobal constants have their values initialized via the code on startup.
- The net result of this distinction is as follows: if a world is saved out via WRITE-IMAGE, and then used to restart a SubL system, the values of
DEFVARvariables will persist, while any changes toDEFPARAMETERvariables will be lost when they are reset to their original code-specified initial values on startup.
Index
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z
* function
* variable
** variable
*** variable
*CLOCK-GRANULARITY* variable
*CONTINUE-CERROR?* variable
*DEFAULT-PATHNAME-DEFAULTS* variable
*EPOCH* variable
*ERROR-ABORT-HANDLER* variable
*ERROR-HANDLER* variable
*ERROR-MESSAGE* variable
*ERROR-OUTPUT* variable
*IGNORE-BREAKS?* variable
*IGNORE-MUSTS?* variable
*IGNORE-WARNS?* variable
*MOST-NEGATIVE-FIXNUM* variable
*MOST-POSITIVE-FIXNUM* variable
*MULTIPLE-VALUES-LIMIT* variable
*NULL-OUTPUT* variable
*PRINT-ESCAPE* variable
*RAND-MAX* variable
*SIGNAL-MAX* variable
*SILENT-PROGRESS?* variable
*STANDARD-INPUT* variable
*STANDARD-OUTPUT* variable
*SUSPEND-TYPE-CHECKING?* variable
+ function
- function
/ function
/= function
< function
<= function
= function
> function
>= function
A
ACONS function
ADJOIN function
ALERT-USER function
ALPHA-CHAR-P function
ALPHANUMERICP function
APPEND function
APPEND-FILES function
APPLY function
AREF function
ASSOC function
ASSOC-IF function
ATOM function
B
BOTH-CASE-P function
BOUNDP function
BREAK function
BUTLAST function
BYTE macro
C
CAAR function
CADR function
CAND macro
CAR function
CCATCH macro
CCONCATENATE function
CDAR function
CDDR function
CDEC macro
CDESTRUCTURING-BIND macro
CDO macro
CDOHASH macro
CDOLIST macro
CDOTIMES macro
CDR function
CEILING function
CERROR function
CHAR function
CHAR-CODE function
CHAR-DOWNCASE function
CHAR-EQUAL function
CHAR-GREATERP function
CHAR-LESSP function
CHAR-NOT-EQUAL function
CHAR-NOT-GREATERP function
CHAR-NOT-LESSP function
CHAR-UPCASE function
CHAR/= function
CHAR< function
CHAR<= function
CHAR= function
CHAR> function
CHAR>= function
CHARACTERP function
CHECK-TYPE macro
CINC macro
CLET macro
CLOSE function
CLRHASH function
CMERGE function
CMULTIPLE-VALUE-BIND macro
CNOT macro
CODE-CHAR function
CONS function
CONSP function
CONSTANTP function
CONSTRUCT-FILENAME function
COPY-ALIST function
COPY-LIST function
COPY-SEQ function
COPY-TREE function
COR macro
COUNT function
COUNT-IF function
CPOP macro
CPROGV macro
CPUSH macro
CPUSHNEW macro
CREDUCE function
CSETF macro
CSETQ macro
CSOME macro
CTIME macro
CUNWIND-PROTECT macro
D
DEBUG function
DECLAIM macro
DECLARE function
DECODE-UNIVERSAL-TIME function
DEFAULT-SIGNAL-HANDLER function
DEFAULT-STRUCT-PRINT-FUNCTION function
DEFCONSTANT macro
DEFINE macro
DEFINE-METHOD macro
DEFMACRO macro
DEFPARAMETER macro
DEFPOLYMORPHIC macro
DEFSTRUCT macro
DEFVAR macro
DELETE function
DELETE-DUPLICATES function
DELETE-FILE function
DELETE-IF function
DIGIT-CHAR-P function
DIRECTORY function
DPB function
E
EIGHTH function
ELT function
ENCODE-TIMESTRING function
ENCODE-UNIVERSAL-TIME function
ENDP function
EQ function
EQL function
EQUAL function
EQUALP function
ERROR function
EVAL function
EVENP function
F
FBOUNDP function
FIF macro
FIFTH function
FILE-AUTHOR function
FILE-LENGTH function
FILE-WRITE-DATE function
FILL function
FIND function
FIND-IF function
FIND-SYMBOL function
FIRST function
FIXNUMP function
FLOAT function
FLOATP function
FLOOR function
FMAKUNBOUND function
FORCE-OUTPUT function
FORK-PROCESS function
FORMAT function
FOURTH function
FUNCALL function
FUNCTION macro
FUNCTION-INFORMATION function
FUNCTION-SPEC-P function
FUNCTIONP function
FUNLESS macro
FWHEN macro
G
GC function
GENSYM function
GENTEMP function
GET function
GET-CONSING-STATE function
GET-FILE-POSITION function
GET-INTERNAL-REAL-TIME function
GET-MACHINE-NAME function
GET-NETWORK-NAME function
GET-PROCESS-ID function
GET-STRING-FROM-USER function
GET-UNIVERSAL-TIME function
GET-USER-NAME function
GETHASH function
H
HASH-TABLE-COUNT function
HASH-TABLE-P function
I
IDENTITY function
IGNORE function
IN-PACKAGE macro
INPUT-STREAM-P function
INSTALL-SIGNAL-HANDLER function
INT/ function
INTEGER-DECODE-FLOAT function
INTEGERP function
INTERN function
INTERSECTION function
J
K
KEYWORDP function
L
LAST function
LDB function
LDIFF function
LENGTH function
LIST function
LIST* function
[[#FN-DEF-LIST-LENGTH|]]LIST-LENGTH function function
[[#FN-DEF-LISTP|]]LISTP function
[[#FN-DEF-LOAD|]]LOAD function
[[#FN-DEF-LOG-MESSAGE|]]LOG-MESSAGE function
[[#FN-DEF-LOWER-CASE-P|]]LOWER-CASE-P function
M
[[#FN-DEF-MAKE-HASH-TABLE|]]MAKE-HASH-TABLE function
[[#FN-DEF-MAKE-LIST|]]MAKE-LIST function
[[#FN-DEF-MAKE-STRING|]]MAKE-STRING function
[[#FN-DEF-MAKE-SYMBOL|]]MAKE-SYMBOL function
[[#FN-DEF-MAKE-VECTOR|]]MAKE-VECTOR function
[[#FN-DEF-MAKUNBOUND|]]MAKUNBOUND function
[[#FN-DEF-MAPC|]]MAPC function
[[#FN-DEF-MAPCAN|]]MAPCAN function
[[#FN-DEF-MAPCAR|]]MAPCAR function
[[#FN-DEF-MAPCON|]]MAPCON function
[[#FN-DEF-MAPHASH|]]MAPHASH function
[[#FN-DEF-MAPL|]]MAPL function
[[#FN-DEF-MAPLIST|]]MAPLIST function
[[#FN-DEF-MAX|]]MAX function
[[#FN-DEF-MEMBER|]]MEMBER function
[[#FN-DEF-MEMBER-IF|]]MEMBER-IF function
[[#FN-DEF-MIN|]]MIN function
[[#FN-DEF-MINUSP|]]MINUSP function
[[#FN-DEF-MISMATCH|]]MISMATCH function
[[#FN-DEF-MOD|]]MOD macro
[[#FN-DEF-MULTIPLE-VALUE-LIST|]]MULTIPLE-VALUE-LIST macro
[[#FN-DEF-MUST|]]MUST function
N
[[#FN-DEF-NBUTLAST|]]NBUTLAST function
[[#FN-DEF-NCONC|]]NCONC function
[[#FN-DEF-NINTERSECTION|]]NINTERSECTION function
[[#FN-DEF-NINTH|]]NINTH function
[[#FN-DEF-NOTE-ACTIVITY|]]NOTE-ACTIVITY function
[[#FN-DEF-NOTE-NUMERIC-PROGRESS|]]NOTE-NUMERIC-PROGRESS function
[[#FN-DEF-NOTE-PERCENT-PROGRESS|]]NOTE-PERCENT-PROGRESS function
[[#FN-DEF-NOTIFY-USER|]]NOTIFY-USER macro
[[#FN-DEF-NOTING-ACTIVITY|]]NOTING-ACTIVITY macro
[[#FN-DEF-NOTING-NUMERIC-PROGRESS|]]NOTING-NUMERIC-PROGRESS macro
[[#FN-DEF-NOTING-PERCENT-PROGRESS|]]NOTING-PERCENT-PROGRESS function
[[#FN-DEF-NRECONC|]]NRECONC function
[[#FN-DEF-NREVERSE|]]NREVERSE function
[[#FN-DEF-NSET-DIFFERENCE|]]NSET-DIFFERENCE function
[[#FN-DEF-NSET-EXCLUSIVE-OR|]]NSET-EXCLUSIVE-OR function
[[#FN-DEF-NSTRING-CAPITALIZE|]]NSTRING-CAPITALIZE function
[[#FN-DEF-NSTRING-DOWNCASE|]]NSTRING-DOWNCASE function
[[#FN-DEF-NSTRING-UPCASE|]]NSTRING-UPCASE function
[[#FN-DEF-NSUBLIS|]]NSUBLIS function
[[#FN-DEF-NSUBST|]]NSUBST function
[[#FN-DEF-NSUBST-IF|]]NSUBST-IF function
[[#FN-DEF-NSUBSTITUTE|]]NSUBSTITUTE function
[[#FN-DEF-NSUBSTITUTE-IF|]]NSUBSTITUTE-IF function
[[#FN-DEF-NTH|]]NTH function
[[#FN-DEF-NTHCDR|]]NTHCDR function
[[#FN-DEF-NULL|]]NULL function
[[#FN-DEF-NUMBERP|]]NUMBERP function
[[#FN-DEF-NUNION|]]NUNION function
O
[[#FN-DEF-ODDP|]]ODDP function
[[#FN-DEF-OPEN-BINARY|]]OPEN-BINARY function
[[#FN-DEF-OPEN-TCP-STREAM|]]OPEN-TCP-STREAM function
[[#FN-DEF-OPEN-TEXT|]]OPEN-TEXT function
[[#FN-DEF-OUTPUT-STREAM-P|]]OUTPUT-STREAM-P function
P
[[#FN-DEF-PAIRLIS|]]PAIRLIS macro
[[#FN-DEF-PCASE|]]PCASE macro
[[#FN-DEF-PCOND|]]PCOND macro
[[#FN-DEF-PIF|]]PIF function
[[#FN-DEF-PLUSP|]]PLUSP function
[[#FN-DEF-POSITION|]]POSITION function
[[#FN-DEF-POSITION-IF|]]POSITION-IF function
[[#FN-DEF-PRIN1|]]PRIN1 function
[[#FN-DEF-PRIN1-TO-STRING|]]PRIN1-TO-STRING function
[[#FN-DEF-PRINC|]]PRINC function
[[#FN-DEF-PRINC-TO-STRING|]]PRINC-TO-STRING function
[[#FN-DEF-PRINT|]]PRINT macro
[[#FN-DEF-PRINTING-OBJECT|]]PRINTING-OBJECT function
[[#FN-DEF-PROBE-FILE|]]PROBE-FILE function
[[#FN-DEF-PROCLAIM|]]PROCLAIM macro
[[#FN-DEF-PROGN|]]PROGN macro
[[#FN-DEF-PUNLESS|]]PUNLESS function
[[#FN-DEF-PUT|]]PUT macro
[[#FN-DEF-PWHEN|]]PWHEN function
Q
[[#FN-DEF-QUOTE|]]QUOTE function
R
[[#FN-DEF-RANDOM|]]RANDOM function
[[#FN-DEF-RASSOC|]]RASSOC function
[[#FN-DEF-RASSOC-IF|]]RASSOC-IF function
[[#FN-DEF-READ|]]READ function
[[#FN-DEF-READ-BYTE|]]READ-BYTE function
[[#FN-DEF-READ-CHAR|]]READ-CHAR function
[[#FN-DEF-READ-FROM-STRING|]]READ-FROM-STRING function
[[#FN-DEF-READ-LINE|]]READ-LINE function
[[#FN-DEF-REM|]]REM function
[[#FN-DEF-REMHASH|]]REMHASH function
[[#FN-DEF-REMOVE|]]REMOVE function
[[#FN-DEF-REMOVE-DUPLICATES|]]REMOVE-DUPLICATES function
[[#FN-DEF-REMOVE-IF|]]REMOVE-IF function
[[#FN-DEF-REMPROP|]]REMPROP function
[[#FN-DEF-RENAME-FILE|]]RENAME-FILE function
[[#FN-DEF-REPLACE|]]REPLACE function
[[#FN-DEF-REPORT-ERROR|]]REPORT-ERROR function
[[#FN-DEF-REST|]]REST function
[[#FN-DEF-RESTART-PROCESS|]]RESTART-PROCESS macro
[[#FN-DEF-RET|]]RET function
[[#FN-DEF-REVAPPEND|]]REVAPPEND function
[[#FN-DEF-REVERSE|]]REVERSE function
[[#FN-DEF-ROUND|]]ROUND function
[[#FN-DEF-RPLACA|]]RPLACA function
[[#FN-DEF-RPLACD|]]RPLACD function
S
[[#FN-DEF-SCALE-FLOAT|]]SCALE-FLOAT function
[[#FN-DEF-SEARCH|]]SEARCH function
[[#FN-DEF-SECOND|]]SECOND function
[[#FN-DEF-SEED-RANDOM|]]SEED-RANDOM function
[[#FN-DEF-SEQUENCEP|]]SEQUENCEP function
[[#FN-DEF-SET|]]SET function
[[#FN-DEF-SET-AREF|]]SET-AREF function
[[#FN-DEF-SET-CHAR|]]SET-CHAR function
[[#FN-DEF-SET-CONSING-STATE|]]SET-CONSING-STATE function
[[#FN-DEF-SET-DIFFERENCE|]]SET-DIFFERENCE function
[[#FN-DEF-SET-EXCLUSIVE-OR|]]SET-EXCLUSIVE-OR function
[[#FN-DEF-SET-FILE-POSITION|]]SET-FILE-POSITION function
[[#FN-DEF-SET-NTH|]]SET-NTH function
[[#FN-DEF-SETHASH|]]SETHASH function
[[#FN-DEF-SEVENTH|]]SEVENTH function
[[#FN-DEF-SIXTH|]]SIXTH function
[[#FN-DEF-SLEEP|]]SLEEP function
[[#FN-DEF-SORT|]]SORT function
[[#FN-DEF-STABLE-SORT|]]STABLE-SORT function
[[#FN-DEF-STREAMP|]]STREAMP function
[[#FN-DEF-STRING|]]STRING function
[[#FN-DEF-STRING-CAPITALIZE|]]STRING-CAPITALIZE function
[[#FN-DEF-STRING-DOWNCASE|]]STRING-DOWNCASE function
[[#FN-DEF-STRING-EQUAL|]]STRING-EQUAL function
[[#FN-DEF-STRING-GREATERP|]]STRING-GREATERP function
[[#FN-DEF-STRING-LEFT-TRIM|]]STRING-LEFT-TRIM function
[[#FN-DEF-STRING-LESSP|]]STRING-LESSP function
[[#FN-DEF-STRING-NOT-EQUAL|]]STRING-NOT-EQUAL function
[[#FN-DEF-STRING-NOT-GREATERP|]]STRING-NOT-GREATERP function
[[#FN-DEF-STRING-NOT-LESSP|]]STRING-NOT-LESSP function
[[#FN-DEF-STRING-RIGHT-TRIM|]]STRING-RIGHT-TRIM function
[[#FN-DEF-STRING-TRIM|]]STRING-TRIM function
[[#FN-DEF-STRING-UPCASE|]]STRING-UPCASE function
[[#FN-DEF-STRING/=|]]STRING/= function
[[#FN-DEF-427203732|]]STRING< function
[[#FN-DEF-994985164|]]STRING<= function
[[#FN-DEF-STRING=|]]STRING= function
[[#FN-DEF-427203988|]]STRING> function
[[#FN-DEF-995017932|]]STRING>= function
[[#FN-DEF-STRINGP|]]STRINGP function
[[#FN-DEF-SUBLIS|]]SUBLIS function
[[#FN-DEF-SUBSEQ|]]SUBSEQ function
[[#FN-DEF-SUBSETP|]]SUBSETP function
[[#FN-DEF-SUBST|]]SUBST function
[[#FN-DEF-SUBST-IF|]]SUBST-IF function
[[#FN-DEF-SUBSTITUTE|]]SUBSTITUTE function
[[#FN-DEF-SUBSTITUTE-IF|]]SUBSTITUTE-IF function
[[#FN-DEF-SXHASH|]]SXHASH function
[[#FN-DEF-SYMBOL-FUNCTION|]]SYMBOL-FUNCTION function
[[#FN-DEF-SYMBOL-NAME|]]SYMBOL-NAME function
[[#FN-DEF-SYMBOL-PLIST|]]SYMBOL-PLIST function
[[#FN-DEF-SYMBOL-VALUE|]]SYMBOL-VALUE function
[[#FN-DEF-SYMBOLP|]]SYMBOLP function
T
[[#FN-DEF-TAILP|]]TAILP function
[[#FN-DEF-TENTH|]]TENTH function
[[#FN-DEF-TERPRI|]]TERPRI function
[[#FN-DEF-THIRD|]]THIRD function
[[#FN-DEF-THROW|]]THROW function
[[#FN-DEF-TIME-FROM-NOW|]]TIME-FROM-NOW function
[[#FN-DEF-TIME-HAS-ARRIVED?|]]TIME-HAS-ARRIVED? function
[[#FN-DEF-TIMESTRING|]]TIMESTRING function
[[#FN-DEF-TREE-EQUAL|]]TREE-EQUAL function
[[#FN-DEF-TRUNCATE|]]TRUNCATE function
U
[[#FN-DEF-UNION|]]UNION function
[[#FN-DEF-UNREAD-CHAR|]]UNREAD-CHAR function
[[#FN-DEF-UPPER-CASE-P|]]UPPER-CASE-P function
[[#FN-DEF-USER-CONFIRM|]]USER-CONFIRM function
V
[[#FN-DEF-VALUES|]]VALUES function
[[#FN-DEF-VARIABLE-INFORMATION|]]VARIABLE-INFORMATION function
[[#FN-DEF-VECTOR|]]VECTOR function
[[#FN-DEF-VECTORP|]]VECTORP function
W
[[#FN-DEF-WARN|]]WARN macro
[[#FN-DEF-WITH-BINARY-FILE|]]WITH-BINARY-FILE macro
[[#FN-DEF-WITH-STATIC-AREA|]]WITH-STATIC-AREA macro
[[#FN-DEF-WITH-TEXT-FILE|]]WITH-TEXT-FILE function
[[#FN-DEF-WRITE|]]WRITE function
[[#FN-DEF-WRITE-BYTE|]]WRITE-BYTE function
[[#FN-DEF-WRITE-CHAR|]]WRITE-CHAR function
[[#FN-DEF-WRITE-IMAGE|]]WRITE-IMAGE function
[[#FN-DEF-WRITE-LINE|]]WRITE-LINE function
[[#FN-DEF-WRITE-STRING|]]WRITE-STRING function
[[#FN-DEF-WRITE-TO-STRING|]]WRITE-TO-STRING function
X
Y
Z
[[#FN-DEF-ZEROP|]]ZEROP