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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4989b9b830c34ccd X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-02-22 15:38:15 PST Newsgroups: comp.lang.ada Path: nntp.gmd.de!news.rwth-aachen.de!news.rhrz.uni-bonn.de!news.uni-stuttgart.de!rz.uni-karlsruhe.de!xlink.net!sol.ctr.columbia.edu!spool.mu.edu!howland.reston.ans.net!vixen.cso.uiuc.edu!uwm.edu!news.alpha.net!news.mathworks.com!uunet!in1.uu.net!telesoft!kst From: kst@thomsoft.com (Keith Thompson) Subject: Re: Help:Output to standard error on UNIX Message-ID: Originator: kst@pulsar Sender: news@thomsoft.com (USENET News Admin @flash) Organization: Thomson Software Products, San Diego, CA, USA References: <3iap2e$7s3@fileserv.aber.ac.uk> Date: Wed, 22 Feb 1995 23:38:15 GMT Date: 1995-02-22T23:38:15+00:00 List-Id: 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.