From: Laurent Pautet <pautet@inf.enst.fr>
Subject: Re: fixed point types over an interface
Date: 1997/02/12
Date: 1997-02-12T00:00:00+00:00 [thread overview]
Message-ID: <rcawwsedshp.fsf@quasimodo.enst.fr> (raw)
In-Reply-To: dewar.855364096@merv
>> Another possibility is to use a target independent
>> implementation of Stream_IO, such as is provided with GLADE
>> (the GNAT implementation of the distributed annex PCS). GLADE
>> uses XDR for stream representation, which avoids any endian (or
>> other target dependent) problems.
nassera> good choice. I just wanted to also add that Sun NFS and
nassera> Sun RPC also uses XDR.
nassera> man xdr: (on solaris 2.5)
nassera> DESCRIPTION XDR routines allow C programmers to describe
nassera> arbitrary data structures in a machine-independent
nassera> fashion. Data for remote procedure calls (RPC) are
nassera> transmitted using these routines.
nassera> by the way, I wonder why the man output above mentions
nassera> only "C programmers".
Because it doesn't apply to Ada :-) For instance:
XDR says :
The representation of all items requires a multiple of four bytes (or
32 bits) of data.
LRM says :
For composite types, the Write or Read attribute for each component is
called in a canonical order ... Read and Write should use the smallest
number of stream elements needed to represent all values in the base
range of the scalar type.
So a string of 7 characters is stored on 8 bytes with XDR and 7 with Ada.
GLADE is only 95% XDR in order to follow LRM requirements. The 5%
comes from the XDR 4 bytes rule (basically strings).
next prev parent reply other threads:[~1997-02-12 0:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-02-07 0:00 fixed point types over an interface Allen Krell
1997-02-07 0:00 ` Robert Dewar
1997-02-10 0:00 ` Mats Weber
1997-02-10 0:00 ` Robert Dewar
1997-02-11 0:00 ` nassera
1997-02-12 0:00 ` Samuel Tardieu
1997-02-12 0:00 ` Laurent Pautet
1997-02-12 0:00 ` Laurent Pautet [this message]
1997-02-12 0:00 ` Robert Dewar
1997-02-12 0:00 ` Mats Weber
1997-02-17 0:00 ` Jacob Sparre Andersen
1997-02-18 0:00 ` Robert Dewar
1997-02-12 0:00 ` Jon S Anthony
1997-02-13 0:00 ` Jon S Anthony
1997-02-07 0:00 ` Matthew Heaney
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox