comp.lang.ada
 help / color / mirror / Atom feed
* Printing in Ada
@ 1997-03-14  0:00 Brian Hyatt
  1997-03-17  0:00 ` Jon S Anthony
  1997-03-20  0:00 ` Wolfgang Gellerich
  0 siblings, 2 replies; 4+ messages in thread
From: Brian Hyatt @ 1997-03-14  0:00 UTC (permalink / raw)



I have the Gnat 3.09 version for Windows 95 of Ada.  Is it possible to
send output directly to a printer instead of via a file.




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

* Re: Printing in Ada
  1997-03-14  0:00 Brian Hyatt
@ 1997-03-17  0:00 ` Jon S Anthony
  1997-03-20  0:00 ` Wolfgang Gellerich
  1 sibling, 0 replies; 4+ messages in thread
From: Jon S Anthony @ 1997-03-17  0:00 UTC (permalink / raw)



In article <3328F004.513C@hiwaay.net> Brian Hyatt <dhyatt@hiwaay.net> writes:

> I have the Gnat 3.09 version for Windows 95 of Ada.  Is it possible to
> send output directly to a printer instead of via a file.

Use IO redirection on the standard output (just like for C).

/Jon

-- 
Jon Anthony
Organon Motives, Inc.
Belmont, MA 02178
617.484.3383
jsa@organon.com





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

* Re: Printing in Ada
@ 1997-03-18  0:00 Martin C. Carlisle
  0 siblings, 0 replies; 4+ messages in thread
From: Martin C. Carlisle @ 1997-03-18  0:00 UTC (permalink / raw)



Bryan Hyatt wrote:
> 
> I have the Gnat 3.09 version for Windows 95 of Ada.  Is it possible to
> send output directly to a printer instead of via a file.

You could also try open'ing "lpt1:" if you have it attached. 
Of course the printer codes are not system independent, so your
code would not be portable.  

Alternatively, you can get the win32ada binding, and use Windows 95
calls to get at the printer.

--Martin
-- 
Dr. Martin Carlisle, Asst Prof of Comp Sci, US Air Force Academy
Opinions expressed herein are not necessarily those of USAFA.
mcc@cs.usafa.af.mil;http://www.usafa.af.mil/dfcs/bios/carlisle.html


-- 
Martin C. Carlisle, Computer Science, US Air Force Academy
mcc@cs.usafa.af.mil, http://www.usafa.af.mil/dfcs/bios/carlisle.html
DISCLAIMER:  The opinions contained herein are not necessarily those 
of the US Air Force or the US Government.




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

* Re: Printing in Ada
  1997-03-14  0:00 Brian Hyatt
  1997-03-17  0:00 ` Jon S Anthony
@ 1997-03-20  0:00 ` Wolfgang Gellerich
  1 sibling, 0 replies; 4+ messages in thread
From: Wolfgang Gellerich @ 1997-03-20  0:00 UTC (permalink / raw)



In article <3328F004.513C@hiwaay.net>, Brian Hyatt <dhyatt@hiwaay.net> writes:
|> I have the Gnat 3.09 version for Windows 95 of Ada.  Is it possible to
|> send output directly to a printer instead of via a file.

I use gnat 3.09 under OS/2 Warp 4. Printing works by doing a CREATE
with "LPT1" (which is the name of the printer output channel) as file 
name and then writing into this file. The same should also work under
Windows 95; perhaps the printer name is different.


Wolfgang




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

end of thread, other threads:[~1997-03-20  0:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-03-18  0:00 Printing in Ada Martin C. Carlisle
  -- strict thread matches above, loose matches on Subject: below --
1997-03-14  0:00 Brian Hyatt
1997-03-17  0:00 ` Jon S Anthony
1997-03-20  0:00 ` Wolfgang Gellerich

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