Unit 'printer' Package
[Overview][Procedures and functions][Variables][Index] [#rtl]

AssignLst

Assign text file to printing device.

Declaration

Source position: printer.pp line 42

procedure AssignLst(

  var F: text;

  ToFile: string

);

Description

AssignLst assigns to F a printing device - UNIX only. ToFile is a string with the following form:

See also

lst

  

Default printing file.

Example

program testprn;

uses printer;

var i : integer;
    f : text;

begin
  writeln ('Test of printer unit');
  writeln ('Writing to lst...');
  or:=1 to 80 do writeln (lst,'This is line ',i,'.'#13);
  close (lst);
  writeln ('Done.');
  {$ifdef Unix}
  writeln ('Writing to pipe...');
  assignlst (f,'|/usr/bin/lpr -m');
  rewrite (f);
  or:=1 to 80 do writeln (f,'This is line ',i,'.'#13);
  close (f);
  writeln ('Done.')
  {$endif}
end.


Documentation generated on: Dec 27 2024