[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Returns the five values (or five 'gangs') constituting the SETF method for FORM. See the doc of DEFINE-SETF-METHOD for the meanings of the gangs. It is an error if the third value (i.e., the list of store variables) is not a one-element list. See the doc of GET-SETF-METHOD-MULTIPLE-VALUE for comparison.
Syntax:
(the value-type form) |
Declares that the value of FORM must be of VALUE-TYPE. Signals an error if this is not the case.
Syntax:
(setf {place newvalue}*) |
Replaces the value in PLACE with the value of NEWVALUE, from left to right. Returns the value of the last NEWVALUE. Each PLACE may be any one of the following:
nth elt subseq rest first ... tenth c?r c??r c???r c????r aref svref char schar bit sbit fill-poiter get getf documentation symbol-value symbol-function symbol-plist macro-function gethash char-bit ldb mask-field apply |
Syntax:
(when test {form}*) |
If TEST evaluates to non-NIL, then evaluates FORMs as a PROGN. If not, simply returns NIL.
Syntax:
(ccase keyplace {({key | ({key}*)} {form}*)}*) |
Evaluates KEYPLACE and tries to find the KEY that is EQL to the value of KEYPLACE. If one is found, then evaluates FORMs that follow the KEY and returns the value(s) of the last FORM. If not, signals a correctable error.
If FORM is a macro form, then expands it repeatedly until it is not a macro any more. Returns two values: the expanded form and a T-or-NIL flag indicating whether the original form was a macro.
Syntax:
(multiple-value-call function {form}*) |
Calls FUNCTION with all the values of FORMs as arguments.
Syntax:
(defsetf access-fun {update-fun [doc] | lambda-list (store-var) {decl | doc}* {form}*) |
Defines how to SETF a generalized-variable reference of the form (ACCESS-FUN ...). The doc-string DOC, if supplied, is saved as a SETF doc and can be retrieved by (documentation 'NAME 'setf).
(defsetf access-fun update-fun) defines an expansion from (setf (ACCESS-FUN arg1 ... argn) value) to (UPDATE-FUN arg1 ... argn value). (defsetf access-fun lambda-list (store-var) . body) defines a macro which |
(setf (ACCESS-FUN arg1 ... argn) value) into the form (let* ((temp1 ARG1) ... (tempn ARGn) (temp0 value)) rest) |
Syntax:
(tagbody {tag | statement}*) |
Executes STATEMENTs and returns NIL if it falls off the end.
Syntax:
(etypecase keyform {(type {form}*)}*) |
Evaluates KEYFORM and tries to find the TYPE in which the value of KEYFORM belongs. If one is found, then evaluates FORMs that follow the KEY and returns the value(s) of the last FORM. If not, signals an error.
Syntax:
(let* ({var | (var [value])}*) {decl}* {form}*) |
Initializes VARs, binding them to the values of VALUEs (which defaults to NIL) from left to right, then evaluates FORMs as a PROGN.
Syntax:
(prog1 first {form}*) |
Evaluates FIRST and FORMs in order, and returns the (single) value of FIRST.
Syntax:
(defun name lambda-list {decl | doc}* {form}*) |
Defines a function as the global function definition of the symbol NAME. The complete syntax of a lambda-list is: ({var}* [&optional {var | (var [initform [svar]])}*] [&rest var] [&key {var | ({var | (keyword var)} [initform [svar]])}* [&allow-other-keys]] [&aux {var | (var [initform])}*]) The doc-string DOC, if supplied, is saved as a FUNCTION doc and can be retrieved by (documentation 'NAME 'function).
Syntax:
(multiple-value-bind ({var}*) values-form {decl}* {form}*) |
Binds the VARiables to the results of VALUES-FORM, in order (defaulting to NIL) and evaluates FORMs in order.
Syntax:
(declare {decl-spec}*) |
Gives a declaration. Possible DECL-SPECs are: (SPECIAL {var}*) (TYPE type {var}*) where 'TYPE' is one of the following symbols
array fixnum package simple-bit-vector atom float pathname simple-string bignum function random-state simple-vector bit hash-table ratio single-float bit-vector integer rational standard-char character keyword readtable stream common list sequence string compiled-function long-float short-float string-char complex nil signed-byte symbol cons null unsigned-byte t double-float number simple-array vector |
(vector long-float 80) ; vector of 80 long-floats. (array long-float *) ; array of long-floats (array fixnum) ; array of fixnums (array * 30) ; an array of length 30 but unspecified type |
A list of 1 element may be replaced by the symbol alone, and a list ending in '*' may drop the the final '*'.
(OBJECT {var}*) (FTYPE type {function-name}*) eg: ;; function of two required args and optional args and one value: (ftype (function (t t *) t) sort reduce) ;; function with 1 arg of general type returning 1 fixnum as value. (ftype (function (t) fixnum) length) (FUNCTION function-name ({arg-type}*) {return-type}*) (INLINE {function-name}*) (NOTINLINE {function-name}*) (IGNORE {var}*) (OPTIMIZE {({SPEED | SPACE | SAFETY | COMPILATION-SPEED} {0 | 1 | 2 | 3})}*) (DECLARATION {non-standard-decl-name}*) (:DYNAMIC-EXTENT {var}*) ;GCL-specific. |
Syntax:
(defmacro name defmacro-lambda-list {decl | doc}* {form}*) |
Defines a macro as the global macro definition of the symbol NAME. The complete syntax of a defmacro-lambda-list is:
( [&whole var] [&environment var] {pseudo-var}* [&optional {var | (pseudo-var [initform [pseudo-var]])}*] {[{&rest | &body} pseudo-var] [&key {var | ({var | (keyword pseudo-var)} [initform [pseudo-var]])}* [&allow-other-keys]] [&aux {var | (pseudo-var [initform])}*] | . var})
where pseudo-var is either a symbol or a list of the following form:
( {pseudo-var}* [&optional {var | (pseudo-var [initform [pseudo-var]])}*] {[{&rest | &body} pseudo-var] [&key {var | ({var | (keyword pseudo-var)} [initform [pseudo-var]])}* [ &allow-other-keys ] ] [&aux {var | (pseudo-var [initform])}*] | . var})
As a special case, a non-NIL symbol is accepcted as a defmacro-lambda-list: (DEFMACRO <name> <symbol> ...) is equivalent to (DEFMACRO <name> (&REST <symbol>) ...). The doc-string DOC, if supplied, is saved as a FUNCTION doc and can be retrieved by (documentation 'NAME 'function). See the type doc of LIST for the backquote macro useful for defining macros. Also, see the function doc of PPRINT for the output-formatting.
Returns T if X is a function, suitable for use by FUNCALL or APPLY. Returns NIL otherwise.
Syntax:
(flet ({(name lambda-list {decl | doc}* {form}*)}*) . body) |
Evaluates BODY as a PROGN, with local function definitions in effect. BODY is the scope of each local function definition. Since the scope does not include the function definitions themselves, the local function can reference externally defined functions of the same name. See the doc of DEFUN for the complete syntax of a lambda-list. Doc-strings for local functions are simply ignored.
Syntax:
(ecase keyform {({key | ({key}*)} {form}*)}*) |
Evaluates KEYFORM and tries to find the KEY that is EQL to the value of KEYFORM. If one is found, then evaluates FORMs that follow the KEY and returns the value(s) of the last FORM. If not, signals an error.
Syntax:
(prog2 first second {forms}*) |
Evaluates FIRST, SECOND, and FORMs in order, and returns the (single) value of SECOND.
Syntax:
(progv symbols values {form}*) |
SYMBOLS must evaluate to a list of variables. VALUES must evaluate to a list of initial values. Evaluates FORMs as a PROGN, with each variable bound (as special) to the corresponding value.
Syntax:
(quote x) |
Syntax:
(dotimes (var countform [result]) {decl}* {tag | statement}*) |
Executes STATEMENTs, with VAR bound to each number between 0 (inclusive) and the value of COUNTFORM (exclusive). Then returns the value(s) of RESULT (which defaults to NIL).
Returns T if SYMBOL globally names a special form; NIL otherwise. The special forms defined in Steele's manual are:
block if progv catch labels quote compiler-let let return-from declare let* setq eval-when macrolet tagbody flet multiple-value-call the function multiple-value-prog1 throw go progn unwind-protect |
In addition, GCL implements the following macros as special forms, though of course macro-expanding functions such as MACROEXPAND work correctly for these macros.
and incf prog1 case locally prog2 cond loop psetq decf multiple-value-bind push defmacro multiple-value-list return defun multiple-value-set setf do or unless do* pop when dolist prog dotimes prog* |
Syntax:
(function x) |
Applies FUNCTION to ARGS, with *EVALHOOK* bound to EVALHOOKFN and with *APPLYHOOK* bound to APPLYHOOKFN. Ignores the hook function once, for the top-level application of FUNCTION to ARGS.
Syntax:
(prog* ({var | (var [init])}*) {decl}* {tag | statement}*) |
Creates a NIL block, binds VARs sequentially, and then executes STATEMENTs.
Syntax:
(block name {form}*) |
The FORMs are evaluated in order, but it is possible to exit the block using (RETURN-FROM name value). The RETURN-FROM must be lexically contained within the block.
Syntax:
(progn {form}*) |
Evaluates FORMs in order, and returns whatever the last FORM returns.
Applies FUNCTION. The arguments to the function consist of all ARGs except for the last, and all elements of the last ARG.
Syntax:
(labels ({(name lambda-list {decl | doc}* {form}*)}*) . body) |
Evaluates BODY as a PROGN, with the local function definitions in effect. The scope of the locally defined functions include the function definitions themselves, so their definitions may include recursive references. See the doc of DEFUN for the complete syntax of a lambda-list. Doc-strings for local functions are simply ignored.
Syntax:
(return [result]) |
Returns from the lexically surrounding NIL block. The value of RESULT, which defaults to NIL, is returned as the value of the block.
Syntax:
(typecase keyform {(type {form}*)}*) |
Evaluates KEYFORM and tries to find the TYPE in which the value of KEYFORM belongs. If one is found, then evaluates FORMs that follow the KEY and returns the value of the last FORM. If not, simply returns NIL.
Syntax:
(and {form}*) |
Evaluates FORMs in order from left to right. If any FORM evaluates to NIL, returns immediately with the value NIL. Else, returns the value(s) of the last FORM.
Syntax:
(let ({var | (var [value])}*) {decl}* {form}*) |
Initializes VARs, binding them to the values of VALUEs (which defaults to NIL) all at once, then evaluates FORMs as a PROGN.
Syntax:
(cond {(test {form}*)}*) |
Syntax:
(catch tag {form}*) |
Sets up a catcher with that value TAG. Then evaluates FORMs as a PROGN, but may possibly abort the evaluation by a THROW form that specifies the value EQ to the catcher tag.
Syntax:
(define-modify-macro name lambda-list fun [doc]) |
Defines a read-modify-write macro, like PUSH and INCF. The defined macro will expand a form (NAME place val1 ... valn) into a form that in effect SETFs the value of the call (FUN PLACE arg1 ... argm) into PLACE, where arg1 ... argm are parameters in LAMBDA-LIST which are bound to the forms VAL1 ... VALn. The doc-string DOC, if supplied, is saved as a FUNCTION doc and can be retrieved by (documentation 'NAME 'function).
If FORM is a macro form, then expands it once. Returns two values: the expanded form and a T-or-NIL flag indicating whether the original form was a macro.
Applies FUNCTION to the ARGUMENTs
Syntax:
(case keyform {({key | ({key}*)} {form}*)}*) |
Evaluates KEYFORM and tries to find the KEY that is EQL to the value of KEYFORM. If one is found, then evaluates FORMs that follow the KEY and returns the value(s) of the last FORM. If not, simply returns NIL.
Syntax:
(define-setf-method access-fun defmacro-lambda-list {decl | doc}* {form}*) |
Defines how to SETF a generalized-variable reference of the form (ACCESS-FUN ...). When a form (setf (ACCESS-FUN arg1 ... argn) value) is being evaluated, the FORMs are first evaluated as a PROGN with the parameters in DEFMACRO-LAMBDA-LIST bound to ARG1 ... ARGn. Assuming that the last FORM returns five values (temp-var-1 ... temp-var-k) (value-from-1 ... value-form-k) (store-var) storing-form access-form in order, the whole SETF is then expanded into (let* ((temp-var-1 value-from-1) ... (temp-k value-form-k) (store-var VALUE)) storing-from) Incidentally, the five values are called the five gangs of a SETF method. The doc-string DOC, if supplied, is saved as a SETF doc and can be retrieved by (documentation 'NAME 'setf).
Syntax:
(compiler-let ({var | (var [value])}*) {form}*) |
When interpreted, this form works just like a LET form with all VARs declared special. When compiled, FORMs are processed with the VARs bound at compile time, but no bindings occur when the compiled code is executed.
Returns ARGs in order, as values.
Syntax:
(multiple-value-list form) |
Evaluates FORM, and returns a list of multiple values it returned.
Syntax:
(multiple-value-prog1 form {form}*) |
Evaluates the first FORM, saves all the values produced, then evaluates the other FORMs. Returns the saved values.
Syntax:
(macrolet ({(name defmacro-lambda-list {decl | doc}* . body)}*) {form}*) |
Evaluates FORMs as a PROGN, with the local macro definitions in effect. See the doc of DEFMACRO for the complete syntax of a defmacro-lambda-list. Doc-strings for local macros are simply ignored.
Syntax:
(go tag) |
Jumps to the specified TAG established by a lexically surrounding TAGBODY.
Syntax:
(prog ({var | (var [init])}*) {decl}* {tag | statement}*) |
Creates a NIL block, binds VARs in parallel, and then executes STATEMENTs.
Syntax:
(return-from name [result]) |
Returns from the lexically surrounding block whose name is NAME. The value of RESULT, which defaults to NIL, is returned as the value of the block.
Syntax:
(unless test {form}*) |
If TEST evaluates to NIL, then evaluates FORMs as a PROGN. If not, simply returns NIL.
Syntax:
(multiple-value-setq variables form) |
Sets each variable in the list VARIABLES to the corresponding value of FORM. Returns the value assigned to the first variable.
Syntax:
(locally {decl}* {form}*) |
Gives local pervasive declarations.
Simply returns X.
Returns T if X is NIL; NIL otherwise.
Syntax:
(defconstant name initial-value [doc]) |
Declares that the variable NAME is a constant whose value is the value of INITIAL-VALUE. The doc-string DOC, if supplied, is saved as a VARIABLE doc and can be retrieved by (documentation 'NAME 'variable).
Returns all of the elements of LIST in order, as values.
Signals a fatal error.
Syntax:
(if test then [else]) |
If TEST evaluates to non-NIL, then evaluates THEN and returns the result. If not, evaluates ELSE (which defaults to NIL) and returns the result.
Syntax:
(unwind-protect protected-form {cleanup-form}*) |
Evaluates PROTECTED-FORM and returns whatever it returned. Guarantees that CLEANUP-FORMs be always evaluated before exiting from the UNWIND-PROTECT form.
Evaluates FORM with *EVALHOOK* bound to EVALHOOKFN and *APPLYHOOK* bound to APPLYHOOKFN. Ignores these hooks once, for the top-level evaluation of FORM.
Syntax:
(or {form}*) |
Evaluates FORMs in order from left to right. If any FORM evaluates to non-NIL, quits and returns that (single) value. If the last FORM is reached, returns whatever values it returns.
Syntax:
(ctypecase keyplace {(type {form}*)}*) |
Evaluates KEYPLACE and tries to find the TYPE in which the value of KEYPLACE belongs. If one is found, then evaluates FORMs that follow the KEY and returns the value(s) of the last FORM. If not, signals a correctable error.
Evaluates EXP and returns the result(s).
Syntax:
(psetf {place newvalue}*) |
Similar to SETF, but evaluates all NEWVALUEs first, and then replaces the value in each PLACE with the value of the corresponding NEWVALUE. Returns NIL always.
Syntax:
(throw tag result) |
Evaluates TAG and aborts the execution of the most recent CATCH form that sets up a catcher with the same tag value. The CATCH form returns whatever RESULT returned.
Syntax:
(defparameter name initial-value [doc]) |
Declares the variable NAME as a special variable and initializes the value. The doc-string DOC, if supplied, is saved as a VARIABLE doc and can be retrieved by (documentation 'NAME 'variable).
Syntax:
(defvar name [initial-value [doc]]) |
Declares the variable NAME as a special variable and, optionally, initializes it. The doc-string DOC, if supplied, is saved as a VARIABLE doc and can be retrieved by (documentation 'NAME 'variable).
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |