1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
@node Structures, Iteration and Tests, Operating System, Top
@chapter Structures
@deffn {Macro} DEFSTRUCT
Package:LISP
Syntax:
@example
(defstruct
@{name | (name @{:conc-name | (:conc-name prefix-string) |
:constructor | (:constructor symbol [lambda-list]) |
:copier | (:copier symbol) |
:predicate | (:predicate symbol) |
(:include symbol) |
(:print-function function) |
(:type @{vector | (vector type) | list@}) |
:named | (:static @{ nil | t@})
(:initial-offset number)@}*)@}
[doc]
@{slot-name |
(slot-name [default-value-form] @{:type type | :read-only flag@}*) @}*
)
@end example
Defines a structure. The doc-string DOC, if supplied, is saved as a STRUCTURE
doc and can be retrieved by (documentation 'NAME 'structure).
STATIC is gcl specific and makes the body non relocatable.
See the files misc/rusage.lsp misc/cstruct.lsp, for examples of making
a lisp structure correspond to a C structure.
@end deffn
@defun HELP (&optional symbol)
Package:USER
GCL specific: Prints the documentation associated with SYMBOL. With no
argument, this function prints the greeting message to GCL beginners.
@end defun
|