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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7d6b00835cfb92fc X-Google-Attributes: gid103376,public From: John J Cupak Jr Subject: Re: file to printer (spooling) Date: 2000/03/23 Message-ID: <38DA51C3.A9A4C592@res.raytheon.com>#1/1 X-Deja-AN: 601371035 References: <8bddei$gmg$1@infosun2.rus.uni-stuttgart.de> X-Accept-Language: en Content-Type: multipart/mixed; boundary="------------FA170147285727830E2956B3" X-Complaints-To: news@ext.ray.com X-Trace: bos-service2.ext.raytheon.com 953831956 138.127.184.129 (Thu, 23 Mar 2000 12:19:16 EST) Organization: Raytheon Company MIME-Version: 1.0 NNTP-Posting-Date: Thu, 23 Mar 2000 12:19:16 EST Newsgroups: comp.lang.ada Date: 2000-03-23T00:00:00+00:00 List-Id: This is a multi-part message in MIME format. --------------FA170147285727830E2956B3 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Peter, I've been able to "automagically" spool a file to the printer when closing on a DEC(Compaq?) VAX using the FORM string when the file is opened: with Text_IO; procedure Print_Me is -- This procedure illustrates how to use the VAX/VMS Ada FORM -- parameter in a file create statement. The form string is -- written in DEC/VAX FDL, and specifies the creation of an -- output file which is printed and deleted upon close. It is -- used the same as entering "PRINT/DELETE FILENAME" from DCL. Printer : Text_IO.File_Type; -- File "Handle" begin -- Print_Me Text_IO.Create(File => Printer, -- Internal file handle Mode => Text_IO.Out_File, -- Output file type Name => "PRINT.OUT", -- Name of external file Form => "FILE;" & -- FORM string; file type "PRINT_ON_CLOSE YES;" & -- Print it "DELETE_ON_CLOSE YES;"); -- Discard afterwards Text_IO.Put_Line(Printer, "And away-y-y we go-o-o-o-!"); -- What's printed Text_IO.Close(Printer); -- Now do "PRINT/DELETE FILE.OUT" end Print_Me; Peter Hermann wrote: > we need help: > (First of all, our primary goal is portability) > We create, write (several ada.text_io.put_line), > and close a text file. > Thereafter we want to spool that file to the printer > in order to let it print asynchronously. > How should we do this from within the Ada program? > We do need that action from within the running Ada program. > > Do we need an implementation dependent operating system command call? > If yes, what is the name of that call? > > -- > Peter Hermann Tel+49-711-685-3611 Fax3758 ica2ph@csv.ica.uni-stuttgart.de > Pfaffenwaldring 27 Raum 114, D-70569 Stuttgart Uni Computeranwendungen > http://www.csv.ica.uni-stuttgart.de/homes/ph/ > Team Ada: "C'mon people let the world begin" (Paul McCartney) --------------FA170147285727830E2956B3 Content-Type: text/x-vcard; charset=us-ascii; name="John_J_Cupak.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for John J Cupak Jr Content-Disposition: attachment; filename="John_J_Cupak.vcf" begin:vcard n:Cupak Jr;John J tel;fax:978.858.4336 tel;work:978.858.1222 x-mozilla-html:TRUE org:Raytheon Company;Northeast Software Training version:2.1 email;internet:John_J_Cupak@res.raytheon.com title:Software Engineering Instructor adr;quoted-printable:;;50 Apple Hill Road=0D=0AT3MN35;Tewksbury;MA;01876;USA x-mozilla-cpt:;9904 fn:John J Cupak Jr end:vcard --------------FA170147285727830E2956B3--