File: structure.texi

package info (click to toggle)
gcl27 2.7.1-4
  • links: PTS
  • area: main
  • in suites: trixie
  • size: 25,528 kB
  • sloc: lisp: 211,801; ansic: 53,532; sh: 9,332; makefile: 642; tcl: 53; awk: 25
file content (43 lines) | stat: -rwxr-xr-x 1,361 bytes parent folder | download | duplicates (2)
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