comp.lang.ada
 help / color / mirror / Atom feed
* Problems with network printer
@ 2010-12-23 15:37 tchaco
  0 siblings, 0 replies; only message in thread
From: tchaco @ 2010-12-23 15:37 UTC (permalink / raw)


I am having problems with network printer using ADA.
I would like to know how to name correctly the File adress instead of
the standard "LPT1".
I'm using GNAT Pro 5.04a1.

A example  is shown bellow.

with Ada.Text_Io, Ada.Integer_Text_Io;
use Ada.Text_Io, Ada.Integer_Text_Io;

procedure Printout is

   Turkey : File_Type;

begin

   Create(Turkey, Out_File, "LPT1");
   Put(Turkey, "This is a test of turkey");
   New_Line(Turkey);
   Put(Turkey, "and it should work well.");
   New_Line(Turkey, 2);
   Put("Half of the turkey test.");
   New_Line;

   Set_Output(Turkey);
   Put("This is another test of turkey");
   New_Line;
   Put("and it should work well.");
   New_Line(2);
   Put(Standard_Output, "Half of the turkey test.");
   New_Line(Standard_Output);
   Set_Output(Standard_Output);

   Put("Back to the standard default output.");

   Close(Turkey);

end Printout;



Any suggestions ?

Thank you

Giacomo



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-12-23 15:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-23 15:37 Problems with network printer tchaco

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox