printing tool

Russ Whitaker russ at ashlandhome.net
Sat Dec 30 01:58:38 CET 2000


Hi

On Fri, 29 Dec 2000, Frank Heckenbach wrote:

> Russ Whitaker wrote:
> > 
> > If you like to keep paper copies of your source files and would like to
> > print on both sides of the paper you might like the attached source file.
> > Also, it adds a margin for 3-hole punch.
> 
> Thanks for the contribution. I didn't test it since I have only
> access to PostScript printers at university. Just a little comment
> on the code, though:
> 
> > {$define ESC char(27)}
> 
> Is there any problem with using a constant (ESC = char (27))? Macros
> are a GPC extension (and quite ugly IMHO ;-), and a constant seems
> to work fine AFAICT.

Admittedly this wasn't a good use for $define. Was trying it out and just
left it in. (A better use might be {$define asm asmname} because some of
the source lines in the units are rather long and I don't have a wide
carrage printer.)
 
> Also, I'd suggest to use chr (a proper Pascal function) rather than
> char (a type-cast), also in other places, and to use '' rather than
> "" for normal text strings ("" is also a GPC extension, probably not
> known by many other compilers -- the difference is that "" allows
> C-style escapes, so you'll need it for TABS etc., but not for most
> other strings).
> 
OK

Aso, please make minor correction: In section "check for existing TOF"
add a "continue" statement thus:

    [..]
    NewPage;
    continue;
  end;

Historical footnote: wrote original in A86 assembly 15 years ago.

Thanks
  Russ




More information about the Gpc mailing list