next up previous contents index
Next: The SOCKETS unit. Up: Procedures and functions Previous: Procedures and functions

AssignLst

   

Declaration:

Procedure AssignLst ( Var F : text; ToFile : string[255]) ;

Description:

LINUX only.
Assigns to F a printing device. ToFile is a string with the following form:

Errors:

Errors are reported in Linuxerror.

See also:

lpr (1)

Example
program testprn;

uses printer;

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



Michael Van Canneyt
Thu Sep 10 13:59:33 CEST 1998