.he 'PRINTING''Page %'
.fo 'Steven Hardy'- % -'April 1978'
.ce 2
Printing out your program
=========================
.sp
There are a number of features of the system which you might want to
use when printing out your program to go into the project report to
be handed in soon.
.sp
The first is relatively straightforward - there is a new version of
SHOW which usually makes a better job of tidying programs than the present
one.
To use it, give the command:
 	: load '/pop/lib/show.p';
.br
This reads in the new version of SHOW from the new program library.
Having done this just use SHOW, or SHOWLOAD, in the normal way and the
system will use the new method of printing. This is most appropriate
if the current version of show is indenting too much so that lots
of lines are too long to fit onto the teletype paper.
.sp
The second feature is mostly for my benefit when I come to read up your
project report.
It is much easier to read a program if it fits neatly onto
separate pages, and there is a program called 'pr' which does this.
Heres how to use it.
.sp
First, give POP11 the command:
 	: discout('appendix1') -> cucharout;
.br
Once you have done this the POP11 system will put its output
into the disc file 'appendix1' rather than onto the teletype.
This redirection is stopped by you typing CTRL-X or by your program
having a MISHAP.
So you might type:
 	: discout('appendix1') -> cucharout;
 	: show fileone;
 	: show filetwo;
 	: show filethree;
 	 etc
.br
where 'fileone' is one of the files making up youy program.
You won't get any output on the teletype from this - the output
will be being stored on disc in a file called 'appendix1'.
When you have shown all your program type CTRL-X and give the command:
 	: %pr appendix1
.br
This will cause you program to be printed out on the teletype with
page headings etc.
.sp
The third feature is intended to simplify the preparation of examples
of your program at work. To use this feature, first give the
command:
 	: lib echo;
.br
to read in a special program from the library, then give the command:
 	: echo 'appendix2';
.br
After you have done this everything that is printed on the terminal
will also be stored in the disc file 'appendix2' - this file will also
include a record of what you have typed into your program.
As before, this continues until you type CTRL-X or your
program has a MISHAP. By the way - a second 'echo' command to the
same file loses any stored output.
A typical sequence of commands might be:
 	: lib echo;
 	: echo 'appendix2';
 	: load fileone;
 	: load filetwo;
 	 etc
 	: <an example run of your program>
 	: ^x
 	: %pr appendix2
.sp
This same mechanism can be used to prepare appendix3 - the one
with a sample run of your program with some functions traced.
.sp
The various appendices will be stored on disc even if you log off,
so you can prepare the files on one of the slow teletypes in E209
and then ask Judith if you may use the fast printer in E207 to
do the actual printing out of the files. 
If you ask her nicely, she might even print them out for you at
sometime when the fast printer isn't busy.
