Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > 4a0a3d2c41a3220630917306c0b7fefa > files > 117

gcl-2.6.8-0.13.20130121cvs.fc18.i686.rpm

<html lang="en">
<head>
<title>Type - GCL SI Manual</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="GCL SI Manual">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="prev" href="Doc.html#Doc" title="Doc">
<link rel="next" href="GCL-Specific.html#GCL-Specific" title="GCL Specific">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
  pre.display { font-family:inherit }
  pre.format  { font-family:inherit }
  pre.smalldisplay { font-family:inherit; font-size:smaller }
  pre.smallformat  { font-family:inherit; font-size:smaller }
  pre.smallexample { font-size:smaller }
  pre.smalllisp    { font-size:smaller }
  span.sc    { font-variant:small-caps }
  span.roman { font-family:serif; font-weight:normal; } 
  span.sansserif { font-family:sans-serif; font-weight:normal; } 
--></style>
</head>
<body>
<div class="node">
<a name="Type"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="GCL-Specific.html#GCL-Specific">GCL Specific</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Doc.html#Doc">Doc</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr>
</div>

<h2 class="chapter">14 Type</h2>

<div class="defun">
&mdash; Function: <b>COERCE</b> (<var>x type</var>)<var><a name="index-COERCE-745"></a></var><br>
<blockquote><p>Package:LISP

        <p>Coerces X to an object of the type TYPE.

     </blockquote></div>

<div class="defun">
&mdash; Function: <b>TYPE-OF</b> (<var>x</var>)<var><a name="index-TYPE_002dOF-746"></a></var><br>
<blockquote><p>Package:LISP

        <p>Returns the type of X.

        </blockquote></div>

<div class="defun">
&mdash; Function: <b>CONSTANTP</b> (<var>symbol</var>)<var><a name="index-CONSTANTP-747"></a></var><br>
<blockquote><p>Package:LISP

        <p>Returns T if the variable named by SYMBOL is a constant; NIL otherwise.

        </blockquote></div>

<div class="defun">
&mdash; Function: <b>TYPEP</b> (<var>x type</var>)<var><a name="index-TYPEP-748"></a></var><br>
<blockquote><p>Package:LISP

        <p>Returns T if X is of the type TYPE; NIL otherwise.

        </blockquote></div>

<div class="defun">
&mdash; Function: <b>COMMONP</b> (<var>x</var>)<var><a name="index-COMMONP-749"></a></var><br>
<blockquote><p>Package:LISP

        <p>Returns T if X is a Common Lisp object; NIL otherwise.

        </blockquote></div>

<div class="defun">
&mdash; Function: <b>SUBTYPEP</b> (<var>type1 type2</var>)<var><a name="index-SUBTYPEP-750"></a></var><br>
<blockquote><p>Package:LISP

        <p>Returns T if TYPE1 is a subtype of TYPE2; NIL otherwise.  If it could not
determine, then returns NIL as the second value.  Otherwise, the second value
is T.

        </blockquote></div>

<div class="defun">
&mdash; Macro: <b>CHECK-TYPE</b><var><a name="index-CHECK_002dTYPE-751"></a></var><br>
<blockquote><p>Package:LISP

        <p>Syntax:
     <pre class="example">          (check-type place typespec [string])
</pre>
        <p>Signals an error, if the contents of PLACE are not of the specified type.

        </blockquote></div>

<div class="defun">
&mdash; Macro: <b>ASSERT</b><var><a name="index-ASSERT-752"></a></var><br>
<blockquote><p>Package:LISP

        <p>Syntax:
     <pre class="example">          (assert test-form [({place}*) [string {arg}*]])
</pre>
        <p>Signals an error if the value of TEST-FORM is NIL.  STRING is an format string
used as the error message.  ARGs are arguments to the format string.

        </blockquote></div>

<div class="defun">
&mdash; Macro: <b>DEFTYPE</b><var><a name="index-DEFTYPE-753"></a></var><br>
<blockquote><p>Package:LISP

        <p>Syntax:
     <pre class="example">          (deftype name lambda-list {decl | doc}* {form}*)
</pre>
        <p>Defines a new type-specifier abbreviation in terms of an 'expansion' function
	(lambda lambda-list1 {decl}* {form}*)
where lambda-list1 is identical to LAMBDA-LIST except that all optional
parameters with no default value specified in LAMBDA-LIST defaults to the
symbol '*', but not to NIL.  When the type system of GCL encounters a
type specifier (NAME arg1 ... argn), it calls the expansion function with
the arguments arg1 ... argn, and uses the returned value instead of the
original type specifier.  When the symbol NAME is used as a type specifier,
the expansion function is called with no argument.  The doc-string DOC, if
supplied, is saved as the TYPE doc of NAME, and is retrieved by
(documentation 'NAME 'type).

        </blockquote></div>

<div class="defun">
&mdash; Declaration: <b>DYNAMIC-EXTENT</b><var><a name="index-DYNAMIC_002dEXTENT-754"></a></var><br>
<blockquote><p>Package:LISP
Declaration to allow locals to be cons'd on the C stack. 
For example
(defun foo (&amp;rest l) (declare (:dynamic-extent l)) ...) 
will cause l to be a list formed on the C stack of the foo function
frame. 
Of course passing L out as a value of foo will cause havoc. 
(setq x (make-list n))
(setq x (cons a b))
(setq x (list a  b c ..)) 
also are handled on the stack, for dynamic-extent x.

        </blockquote></div>

   </body></html>