comp.lang.ada
 help / color / mirror / Atom feed
From: Samuel Tardieu <sam@ada.eu.org>
To: Chris.Morgan@BAESEMA.CO.UK
Subject: Re: Ada95 Streams Question
Date: 1996/06/19
Date: 1996-06-19T00:00:00+00:00	[thread overview]
Message-ID: <qw6wx145a3d.fsf@gargantua.enst.fr> (raw)
In-Reply-To: 009A400CB5CAE623.78BE@smcsr3.smcs.se.baesema.co.uk


>>>>> "Chris" == Chris Morgan <Chris.Morgan@BAESEMA.CO.UK> writes:

Chris> How likely is it that the GNAT (or some other Ada95 compiler)
Chris> implementation of Ada stream_io would arbitrarily break this
Chris> arrangement in future? I am told that the in-stream
Chris> representation is only recommended to conform to the in-memory,
Chris> but what are the actual chances of some implementation not
Chris> following this advice?

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.

Chris> Am I really relying entirely on a pure coincidence that the C++
Chris> and the Ada95 definitions can work together, or is it in fact
Chris> the only sensible scheme?

Streams are not portable between Ada and another language. Of
course, an implementation is free to document how it will encode data
so you can get it from another language (and vice-versa).

Chris> Of course I am talking about the simple case where no tags are
Chris> written (I'm not using any dispatching) and no doping
Chris> information, so I am suggesting that two objects which are
Chris> bitwise compatible in memory can naturally be passed forward
Chris> and back down streams between Ada95 and C++ and I can't see why
Chris> this should ever break.

See above.

  Sam
-- 
  Samuel Tardieu -- sam@ada.eu.org




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

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

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