comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: Reading Float Data from a binary file into ada
Date: Tue, 30 Jan 2007 15:51:42 -0500
Date: 2007-01-30T15:51:42-05:00	[thread overview]
Message-ID: <wcc64ao8cgx.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: 1170180250.735903.10580@a34g2000cwb.googlegroups.com

"frikk" <frikker@gmail.com> writes:

> I've been working with ada for awhile, but I'm still not very good at 
> the syntaxes of more complicated data management commands.  How does 
> ada store its floating point data? Is it stored like an ieee standard?

Ada and C are the same in this regard -- Ada and C compilers will
typically store Floats in the way the hardware normally stores them,
which is IEEE on many machines.  Of course, neither language standard
requires any particular representation, but it's usually safe to trust
that C float and Ada Float are represented the same way on the same
machine.

The VB format you mentioned doesn't sound like IEEE float, but anyway,
if you want to write an Ada algorithm that mimics the C one, you should
use Unchecked_Conversion to do the "cast" from array-of-4-bytes to
Float, if that's what it does.

- Bob



  parent reply	other threads:[~2007-01-30 20:51 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-30 15:51 Reading Float Data from a binary file into ada frikk
2007-01-30 16:37 ` Dmitry A. Kazakov
2007-01-30 16:55 ` Jean-Pierre Rosen
2007-01-30 17:35   ` Ali Bendriss
2007-02-01 16:28   ` Ali Bendriss
2007-02-01 17:27     ` Jean-Pierre Rosen
2007-01-30 17:56 ` Jeffrey R. Carter
2007-01-30 18:04   ` frikk
2007-01-30 19:56     ` frikk
2007-01-31 18:30       ` Jeffrey R. Carter
2007-01-30 20:51     ` Robert A Duff [this message]
2007-01-31 18:25     ` Jeffrey R. Carter
2007-01-31 18:57       ` frikk
2007-01-30 19:31 ` Niklas Holsti
2007-01-30 21:14   ` Cesar Rabak
2007-01-30 21:36     ` frikk
2007-02-01 21:11   ` Simon Wright
2007-02-01 21:44     ` Niklas Holsti
2007-02-03 12:13       ` Simon Wright
2007-02-03 14:59         ` Gautier
2007-02-03 17:01           ` Simon Wright
2007-01-30 20:02 ` Martin Dowie
2007-01-30 20:09   ` frikk
2007-01-30 20:23     ` Martin Dowie
2007-01-31  3:54 ` Steve
2007-01-31  8:42   ` Maciej Sobczak
2007-01-31 14:12   ` frikk
2007-01-31 18:38     ` frikk
2007-02-01  0:05       ` Jeffrey R. Carter
2007-02-01  2:59       ` Steve
2007-02-01 16:05         ` Bob Spooner
replies disabled

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