From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=AXB_XMAILER_MIMEOLE_OL_024C2, BAYES_00,MAILING_LIST_MULTI,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ebf21123df395107 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-09 12:30:06 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!opentransit.net!wanadoo.fr!freenix!enst!enst.fr!not-for-mail From: "David C. Hoos, Sr." Newsgroups: comp.lang.ada Subject: Re: Output to Printer Problems Date: Sun, 9 Jun 2002 14:31:01 -0500 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: References: <3D037471.5AF4DB79@NOTINNEDMEATntlworld.com> Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: avanie.enst.fr 1023651003 39212 137.194.161.2 (9 Jun 2002 19:30:03 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Sun, 9 Jun 2002 19:30:03 +0000 (UTC) Return-Path: X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.8 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:25615 Date: 2002-06-09T14:31:01-05:00 ----- Original Message ----- From: "Pheet" Newsgroups: comp.lang.ada To: 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.