From: tchaco <giacomo.lacerda@gmail.com>
Subject: Problems with network printer
Date: Thu, 23 Dec 2010 07:37:55 -0800 (PST)
Date: 2010-12-23T07:37:55-08:00 [thread overview]
Message-ID: <7af65789-1587-4f48-8366-440d903d48b7@c39g2000yqi.googlegroups.com> (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
reply other threads:[~2010-12-23 15:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox