comp.lang.ada
 help / color / mirror / Atom feed
From: John J Cupak Jr <John_J_Cupak@res.raytheon.com>
Subject: Re: file to printer (spooling)
Date: 2000/03/23
Date: 2000-03-23T00:00:00+00:00	[thread overview]
Message-ID: <38DA51C3.A9A4C592@res.raytheon.com> (raw)
In-Reply-To: 8bddei$gmg$1@infosun2.rus.uni-stuttgart.de

[-- Attachment #1: Type: text/plain, Size: 2056 bytes --]

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)

[-- Attachment #2: Card for John J Cupak Jr --]
[-- Type: text/x-vcard, Size: 364 bytes --]

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

  reply	other threads:[~2000-03-23  0:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-23  0:00 file to printer (spooling) Peter Hermann
2000-03-23  0:00 ` John J Cupak Jr [this message]
2000-03-23  0:00   ` Larry Kilgallen
2000-03-23  0:00   ` Robert Dewar
2000-03-23  0:00 ` Pascal MALAISE
2000-03-23  0:00 ` Larry Kilgallen
2000-03-23  0:00   ` Tucker Taft
2000-03-24  0:00 ` Tarjei T. Jensen
replies disabled

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