comp.lang.ada
 help / color / mirror / Atom feed
From: Chris.Morgan@BAESEMA.CO.UK
Subject: Re: Ada95 Streams Question
Date: 1996/06/24
Date: 1996-06-24T00:00:00+00:00	[thread overview]
Message-ID: <009A4544BE3357B3.44C7@smcsr3.smcs.se.baesema.co.uk> (raw)


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




             reply	other threads:[~1996-06-24  0:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-06-24  0:00 Chris.Morgan [this message]
  -- strict thread matches above, loose matches on Subject: below --
1996-06-23  0:00 Ada95 Streams Question Robert Dewar
1996-06-24  0:00 ` michael
1996-06-24  0:00   ` Robert Dewar
1996-06-28  0:00     ` michael
1996-06-28  0:00       ` Robert Dewar
1996-07-01  0:00         ` Laurent Pautet
1996-07-01  0:00           ` Robert Dewar
1996-06-28  0:00     ` Robert A Duff
1996-06-30  0:00       ` Robert Dewar
1996-07-02  0:00     ` sam
1996-06-24  0:00   ` Laurent Pautet
1996-06-25  0:00   ` Theodore E. Dennison
1996-06-17  0:00 Chris.Morgan
1996-06-18  0:00 ` Robert I. Eachus
1996-06-19  0:00 ` Samuel Tardieu
1996-06-20  0:00   ` Robert Dewar
replies disabled

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