comp.lang.ada
 help / color / mirror / Atom feed
From: "David C. Hoos, Sr." <david.c.hoos.sr@ada95.com>
Subject: Re: Output to Printer Problems
Date: Sun, 9 Jun 2002 14:31:01 -0500
Date: 2002-06-09T14:31:01-05:00	[thread overview]
Message-ID: <mailman.1023651003.21495.comp.lang.ada@ada.eu.org> (raw)
In-Reply-To: 3D037471.5AF4DB79@NOTINNEDMEATntlworld.com


----- Original Message ----- 
From: "Pheet" <a.pheet@NOTINNEDMEATntlworld.com>
Newsgroups: comp.lang.ada
To: <comp.lang.ada@ada.eu.org>
Sent: June 09, 2002 10:29 AM
Subject: Output to Printer Problems


> Hiya,
> 
> I am having problems printing with ada. I'm using GNAT 3.13p
> (GCC 2.8.1) on a Win98 box (yes, I know, don't ask).
> 
> I'm trying code along these lines:
> 
> with Text_IO;
> use Text_io;
> 
> ...
> 
> Procedure Print is
> File:FIle_Type;
> Begin
>         open (File, Out_Mode, "LPT1");
>         put(File, "Hello Printer!");
>         close(File);
> ...
> end print;
>
Three problems I can see with your program, viz.:

  1. There is no file mode in Text_IO called "Out_Mode";
     Perhaps you meant "Out_File."

  2. An file of mode Out_File cannot be opened -- it can
     only be created.  Only files of In_File, and Append_File
     modes can be opened, and printers generally don't accept
     being opened in Append_File mode.

  3. You probably will need to add a line "New_Page (File);"
     in order to get the printer to eject the page.


   





  reply	other threads:[~2002-06-09 19:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-09 15:29 Output to Printer Problems Pheet
2002-06-09 19:31 ` David C. Hoos, Sr. [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-06-09 14:39 Pheet
2002-06-09 18:38 ` Jeffrey Carter
replies disabled

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