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: eachus@spectre.mitre.org (Robert I. Eachus) Subject: Re: Ada95 Streams Question Date: 1996/06/18 Message-ID: #1/1 X-Deja-AN: 161408607 references: <009A400CB5CAE623.78BE@smcsr3.smcs.se.baesema.co.uk> organization: The Mitre Corp., Bedford, MA. newsgroups: comp.lang.ada Date: 1996-06-18T00:00:00+00:00 List-Id: In article <009A400CB5CAE623.78BE@smcsr3.smcs.se.baesema.co.uk> Chris.Morgan@BAESEMA.CO.UK writes: Chris.Morgan@BAESEMA.CO.UK asked: > I have a question about Ada95 stream implementations. I mentioned > this work a little while back in response to a request for Ada95 > success stories, but now I'm feeling a little unsettled by > accusations of being a hacker!... > How likely is it that the GNAT (or some other Ada95 compiler) > implementation of Ada stream_io would arbitrarily break this > arrangement in future? I am told that the in-stream representation > is only recommended to conform to the in-memory, but what are the > actual chances of some implementation not following this advice? I think that in your situation, the chances are good that it will always work, but you are taking a chance, and it is probably the first place to look for trouble if you install a new compiler version, etc. > Am I really relying entirely on a pure coincidence that the C++ > and the Ada95 definitions can work together, or is it in fact the > only sensible scheme? If the Ada and C++ are on the same processor architecture, you are pretty safe. If they can be on different processors, especially processors with different bit or byte orientations, all bets are off. In those cases I have used RPC routines to maintain architecture independence. -- Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is...