comp.lang.ada
 help / color / mirror / Atom feed
* Re: Help:Output to standard error on UNIX
       [not found] <3iap2e$7s3@fileserv.aber.ac.uk>
@ 1995-02-22 23:38 ` Keith Thompson
  0 siblings, 0 replies; only message in thread
From: Keith Thompson @ 1995-02-22 23:38 UTC (permalink / raw)


In <3iap2e$7s3@fileserv.aber.ac.uk> ppc94@aber.ac.uk (Paul Crafts) writes:
> Can you help?
> We have to send output to standard error on a UNIX system from within an
> Ada program.  We do not have a licence for the POSIX set of packages
> which would have done the job so we've got to find an alternative
> method. File handling is done using TEXT_IO , is there a way of
> directing output to STANDARD ERROR using this package.  If it matters
> we're using the Alsys compiler on Solaris machines running SunOS 5.3.

I already responded to this by e-mail, but I thought others might be
interested.

If you're using an Ada 95 compiler (and don't mind your code not
being portable to Ada 83 compilers), just use the Current_Error or
Standard_Error file defined in Ada.Text_IO.  (They're the same unless
you've called Set_Error.

If you have the POSIX packages (and don't mind your code not being
portable to systems without POSIX support), it provides the facilities
you need.

If you're running on SunOS 5.x (and don't mind your code not being
portable to other (non-SVR4?) Unix systems), you can write to the file
"/dev/stderr".

Otherwise, you can probably interface to the C I/O routines fairly easily
(insert yet another portability caveat here).

-- 
Keith Thompson (The_Other_Keith)  kst@thomsoft.com (kst@alsys.com still works)
TeleSoft^H^H^H^H^H^H^H^H Alsys^H^H^H^H^H Thomson Software Products
10251 Vista Sorrento Parkway, Suite 300, San Diego, CA, USA, 92121-2718
When you're a nail, every problem looks like a hammer.



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1995-02-22 23:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <3iap2e$7s3@fileserv.aber.ac.uk>
1995-02-22 23:38 ` Help:Output to standard error on UNIX Keith Thompson

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