MTS 8: LISP and SLIP in MTS
June 1976
((LIST (MAPCAN ’(LAMBDA (A)
(LIST A ’HIT)) X)))))
(STATUS (2 HIT T))
(READ)
(A B C HIT (D E F) G)
will return
(A B C (D HIT E HIT F HIT) G)
and
(READ)
(A B C HIT D E F)
will return
(A B C (D HIT) E F)
PRINTMACRO Atoms
(STATUS (4 HIT T)) defines HIT as a PRINTMACRO atom. Whenever an
attempt is made to print the atom HIT, the HIT function will be
called instead. The value returned from the HIT function is
ignored, since the HIT function itself has complete access to the
current buffer. After return from the HIT function, the rest of
the PRINT operation will be completed.
The READMACRO Character Characteristic
A single-character READMACRO atom may be given the additional
characteristic of a READMACRO character by altering its disposition
in the READ scan table. A READMACRO character need not occur as an
atom, but may occur at the beginning of any S-expression. However,
a READMACRO character which is strictly embedded in an atom, or
which occurs at the end of an atom, will not be recognized as a
macro (unless STATUS was used to alter the system READ tables--see
codes 22-24 in subsection "The STATUS Function").
For example, redefine the character Q as a READMACRO equivalent to
the system substitution function:
(DEFUN Q (X) (LIST (LIST ’QUOTE (READ))))
(STATUS (5 Q 28) (2 Q T))
QA = A
Q(A B C) = (A B C)
QQ(A B C) = (QUOTE (A B C))
52 LISP

MTS 8: LISP and SLIP in MTS
June 1976
Description of Optional I/O Parameters ______________________________________
IOARG
The IOARG parameter, if present in an I/O call, defines the
buffer-file pair to be used. It must be the value of an I/O
destination atom created by OPEN, one of the system I/O destination
atoms (LISPIN, LISPOUT, ERRIN, ERROUT), or NIL.
If either the buffer or file portion of the IOARG is NIL, then the
appropriate system default buffer will be used. Thus, a user who
wishes to specify the IOSW or FN parameters but not the IOARG can
specify a NIL IOARG, and the system defaults will be used.
IOSW
The IOSW parameter is used as a switch to control system I/O
parameters. The values below can be added together to specify
several nondefault options on one I/O call. The default for all
codes is 0.
Code Meaning if Nonzero ____ __________________
01 Disable all I/O macro processing for this operation.
02 Suppress insertions of a blank character before each
S-expression on output (meaningful only for PRINT and
PRIN1).
04 If an atom to be printed contains any break characters (such
as blanks, primes, etc.), then insert a quote character
before and after the atom in the output buffer. This option
allows the user to produce file output which can be read in
at a later time (meaningful only for PRINT and PRIN1).
08 Print in "terse mode," that is, print only the first line of
the S-expression which is to be printed (meaningful only for
PRINT AND PRIN1).
16 Double-space the first output line of this print.
FN
The FN parameter, if specified, is the intercept function for the
operation. It must be a LISP function specification. The opera-
tion of the intercept function is described above in the subsection
"Buffer Overflow Interception."
LISP 53
Previous Page Next Page