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,3db17e1869f3a33d X-Google-Attributes: gid103376,public From: Chris.Morgan@BAESEMA.CO.UK Subject: Re: Ada95 Streams Question Date: 1996/06/24 Message-ID: <009A4544BE3357B3.44C7@smcsr3.smcs.se.baesema.co.uk>#1/1 X-Deja-AN: 162003573 sender: Ada programming language comments: To: sam@inf.enst.fr x-vms-to: SMTP%"sam@inf.enst.fr" newsgroups: comp.lang.ada x-vms-cc: SMTP%"info-ada@listserv.nodak.edu" Date: 1996-06-24T00:00:00+00:00 List-Id: Samuel wrote : >To be general, Ada compilers are free to use any representation of >streams. One may well choose raw conversions (as GNAT does) while >another one will adopt XDR encoding. > (Please note. My comments below apply to my particular case - using streams between different processes on the same machine running Solaris.) This is a good point. However if a compiler took the trouble of offering XDR, it would presumably document this, and perhaps offer raw streams as well (maybe with a configuration pragma since they seem, to me, the easiest to support). Either way, the C++ can again be connected up quite straightforwardly (since XDR is a natural format for network transfer, I'm sure C++ can be made to read that in preference to raw data). It seems to me that yes, in principle what I'm doing is not portable, but it is unlikely to break when connecting Ada to C++ on comparable platforms, whatever the version of GNAT. For another compiler it would either work the same, or some other easily understood way. What I would be surprised by is if an Ada stream were some new entity with unknown internal structure (neither ASCII, nor raw binary, nor XDR etc). Why would anyone bother when the Unix (Solaris) streams facility is already a large superset of the whole Ada Streams concept? That I think is the root of my question. To me it would be as bad as if the compiler implementation team redesigned arithmetic on the machine and used different float layouts than the C compiler (or ABI) of the hardware vendor. On special machines, yes you may have to. On machines with a proper operating system, please don't bother!! Greetings from London (warm and hazy). Chris Morgan