From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: fixed point types over an interface
Date: 1997/02/07
Date: 1997-02-07T00:00:00+00:00 [thread overview]
Message-ID: <dewar.855364096@merv> (raw)
In-Reply-To: 32FBB550.41C67EA6@efogm.msd.ray.com
Allen Krell said
<<With Ada83, is it safe to assume that two different
compilers will store a fixed point type in the same way?
For example
Two processors are communicating over an interface. The
applications for each processor are written/compiled
using compilers from two different vendors.
If each application has
type FX_PT_TYPE is delta .001 range -100 .. +100;
Variable : FX_PT_TYPE := 1.345;
Will the binary representation of 'Variable'
be the same with both compilers?>>
The answer for both Ada 83 and Ada 95 is certainly not. As with all
data in the absence of rep clauses, there is lots of freedom for
a compiler to decide how to store the data. In particular for fixed-point
some compilers will use the largest Small possible, and others will
use the smallest Small possible.
To pin this down, you need to use a Small clause and a Size clause,
then you should be pretty safe relying on the result, although one
can imagine compilers doing weird things.
next prev parent reply other threads:[~1997-02-07 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 [this message]
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 ` Jon S Anthony
1997-02-12 0:00 ` Laurent Pautet
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-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