comp.lang.ada
 help / color / mirror / Atom feed
From: johnherro@aol.com (John Herro)
Subject: Re: A simple question about Ada
Date: 1996/11/05
Date: 1996-11-05T00:00:00+00:00	[thread overview]
Message-ID: <55o0vn$ncr@newsbf02.news.aol.com> (raw)
In-Reply-To: 55l1q1$qnk@artemis.ibernet.es


perico@tinet.fut.es (Perico de los Palotes) writes:
> Anybody can tell me how can I write something
> to printer?  Just like "put" writes to screen.

On an IBM PC, I just use Ada.Text_IO to Create "PRN" in Out_File mode, as
if "PRN" were a file.  Then I just Put or Put_Line to that "file."  For
example,

with Ada.Text_IO; use Ada.Text_IO;
procedure Write_Hello is
   F : File_Type;
begin
   Create(F, Out_File, "PRN");
   Put_Line(F, "Hello");
   Close(F);
end Write_Hello;

Unfortunately, the procedure for writing to the printer will vary for
other platforms.

- John Herro
Software Innovations Technology
http://members.aol.com/AdaTutor
ftp://members.aol.com/AdaTutor




      reply	other threads:[~1996-11-05  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-11-04  0:00 A simple question about Ada Perico de los Palotes
1996-11-05  0:00 ` John Herro [this message]
replies disabled

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