comp.lang.ada
 help / color / mirror / Atom feed
* A simple question about Ada
@ 1996-11-04  0:00 Perico de los Palotes
  1996-11-05  0:00 ` John Herro
  0 siblings, 1 reply; 2+ messages in thread
From: Perico de los Palotes @ 1996-11-04  0:00 UTC (permalink / raw)




Anybody can tell me how can I write something to printer?
Just like "put" writes to screen.

Thanks.





^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: A simple question about Ada
  1996-11-04  0:00 A simple question about Ada Perico de los Palotes
@ 1996-11-05  0:00 ` John Herro
  0 siblings, 0 replies; 2+ messages in thread
From: John Herro @ 1996-11-05  0:00 UTC (permalink / raw)



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




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1996-11-05  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-11-04  0:00 A simple question about Ada Perico de los Palotes
1996-11-05  0:00 ` John Herro

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