[fa.info-mac] More on MacPascal Files

info-mac@uw-beaver (info-mac) (08/23/84)

From: Stuart T. Reges <REGES.REGES@SU-SCORE.ARPA>
My message yesterday was mostly correct.  The one thing I was wrong about was 
the documentation.  The Beta documentation does in fact discuss PRINTER: as a
device on pages 9-25 and 9-26.  Think Technologies assures me that some
variation on PRINT or PRINTING or PRINTER will be in the final index for the
documentation.

About printing files, the program I presented yesterday does work, but does not
take full advantage of the Mac's built-in user interface.  The following program
is much better:

	program Print;
	var line: string;
	    infile, outfile: text;
	begin
	    rewrite (outfile, 'printer:');
	    reset (infile, OldFileName ('What file do you want printed?'));
	    while not eof (infile) do begin
		readln (infile, line);
		writeln (outfile, line);
	    end;
	end.

The call on function OldFileName will create a window that allows the user to
select which file to print.

A program like this, then, can be used to print an external file generated by a
program.  It can also be used to print program files.  If you have one Mac and
one printer, it would be foolish to use this PRINT program to print your Pascal
program because one of the FILE menu options is PRINT.  I can imagine that in
some settings, however, you might have a dedicated Mac and printer used for
printing files in a lab where most Macs have no printer.  In such an instance,
it might be useful to have this PRINT program executing indefinitely and have
students use it to print both their programs and data files.

This still does not answer the question of how to create data input files.  
If we try to type it in in the program window the automatic formatting will
cause problems.  I haven't heard whether the final release of the product allows
one to temporarily switch off program formatting and go into a fixed width font.
There was a lot of pressure for them to do this, so I hope they have.  If not,
we'll have to use MacWrite to make our input files.
-------