comp.lang.ada
 help / color / mirror / Atom feed
* Sending characters from Ada to the printer on this dam$$#!! blo$$## vindoze
@ 2001-10-19 14:16 Vincent MORIN
  2001-10-20  3:04 ` Jeffrey Carter
  0 siblings, 1 reply; 2+ messages in thread
From: Vincent MORIN @ 2001-10-19 14:16 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 786 bytes --]

     Hello to the community,

     Is it so difficult to send characters to the printer from Ada on
windows ?
     My printer is a local HP laserjet MP6 called HPL6 on port LPT1:
simple minded as I am I believed that

Open( PrintFile, Out_File, "LPT1:" );

or Open( .... "\HPL6" );

    Anyone already dit it ? what is the printer name to use in the
Text_io.Open statement ?

    Many thanks for help (or I'm gonna clash a neuron)

    VMO

(When the printer is remote on a server, a name like
"\\ServerName\PrinterName" works. But on a local machine called KALINDA with
printer HPL6, "\\KALINDA\HPL6 does not work". What a hell this vindoz ! )

--
vincent.morin@univ-brest.fr
Laboratoire de Biostatistiques et Informatique M�dicale
22 Avenue Camille Desmoulins
29285 Brest cedex





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

* Re: Sending characters from Ada to the printer on this dam$$#!! blo$$## vindoze
  2001-10-19 14:16 Sending characters from Ada to the printer on this dam$$#!! blo$$## vindoze Vincent MORIN
@ 2001-10-20  3:04 ` Jeffrey Carter
  0 siblings, 0 replies; 2+ messages in thread
From: Jeffrey Carter @ 2001-10-20  3:04 UTC (permalink / raw)


Vincent MORIN wrote:
> 
>      My printer is a local HP laserjet MP6 called HPL6 on port LPT1:
> simple minded as I am I believed that
> 
> Open( PrintFile, Out_File, "LPT1:" );

This works with GNAT 3.13p/Win98:

with Ada.Text_IO;
use Ada.Text_IO;
procedure Print_It is
   Printer : File_Type;
begin -- Print_It
   Create (File => Printer, Mode => Out_File, Name => "LPT1:");
   Put_Line (File => Printer, Item => "Here is a line for the printer");
   New_Page (File => Printer);
   Close (File => Printer);
end Print_It;

-- 
Jeff Carter
"English bed-wetting types."
Monty Python & the Holy Grail



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

end of thread, other threads:[~2001-10-20  3:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-19 14:16 Sending characters from Ada to the printer on this dam$$#!! blo$$## vindoze Vincent MORIN
2001-10-20  3:04 ` Jeffrey Carter

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