V6/usr/man/man6/m6.6

Compare this file to the similar file:
Show the results in this format:

.th M6 VI 2/19/74
.sh NAME
m6 \*- general purpose macroprocessor
.sh SYNOPSIS
.bd m6
[ name ]
.sh DESCRIPTION
.it M6
copies the standard input to the standard output,
with substitutions for any macro calls that appear.
When a file name argument
is given, that file is read before the standard input.
.s3
The processor is as described in the reference with these
exceptions:
.s3
.lp +2 0
.it #def,arg1,arg2,arg3:
causes \fIarg1\fP to
become a macro with defining text \fIarg2\fP and (optional) built-in serial number
\fIarg3\fP.
.s3
.it #del,arg1:
deletes the definition of macro \fIarg1\fP.
.s3
.it #end:
is not implemented.
.s3
.it #list,arg1:
sends the name of the macro designated by \fIarg1\fP to the current
destination without recognition of any warning characters;
\fIarg1\fP is 1 for the most recently defined macro, 2 for the next most recent,
and so on.
The name is taken to be empty when \fIarg1\fP doesn't make sense.
.s3
.it #warn,arg1,arg2:
replaces the old warning character \fIarg1\fP by the new warning character \fIarg2\fP.
.s3
.it #quote,arg1:
sends the definition text of macro \fIarg1\fP to the current
destination without recognition of any warning characters.
.s3
.it #serial,arg1:
delivers the built-in serial number associated
with macro \fIarg1\fP.
.s3
.it #source,arg1:
is not implemented.
.s3
.it #trace,arg1:
with \fIarg1\fP = `1'
causes a reconstruction of each later call to be placed
on the standard output with a call level number;
other values of \fIarg1\fP turn tracing off.
.i0
.s3
The built-in `warn' may be used to replace inconvenient warning characters.
The example below replaces `#' `:' `<' `>' by `[' `]' `{' `}'.
.s3
.lp +10 0
.nf
#warn,<#>,[:
[warn,<:>,]:
[warn,[substr,<<>>,1,1\fB;\fP,{]
[warn,[substr,{{>>,2,1\fB;\fP,}]
[now,{calls look like this}]
.fi
.i0
.s3
Every built-in function has a serial number, which specifies the action
to be performed before the defining text is expanded.
The serial numbers are:
1 gt,
2 eq,
3 ge,
4 lt,
5 ne,
6 le,
7 seq,
8 sne,
9 add,
10 sub,
11 mpy,
12 div,
13 exp,
20 if,
21 def,
22 copy,
23 warn,
24 size,
25 substr,
26 go,
27 gobk,
28 del,
29 dnl,
32 quote,
33 serial,
34 list,
35 trace.
Serial number 0
specifies no built-in action.
.sh "SEE ALSO"
A. D. Hall, M6 Reference Manual.
Computer Science Technical Report #2, Bell Laboratories, 1969.
.sh DIAGNOSTICS
Various table overflows and ``impossible'' conditions
result in comment and dump.
There are no diagnostics for poorly formed input.
.sh AUTHOR
M. D. McIlroy
.sh BUGS
Provision should be made to extend tables as needed,
instead of wasting a big fixed core allocation.
You get what the PDP11 gives you for arithmetic.