From: dahaverk@cca.rockwell.com (Dave Haverkamp)
Subject: Re: GNAT Ada for DOS - Reading Integers Problem
Date: 1996/02/20
Date: 1996-02-20T00:00:00+00:00 [thread overview]
Message-ID: <Dn33HL.ICr@lazrus.cca.rockwell.com> (raw)
In-Reply-To: tgmDMwoGx.B04@netcom.com
In article <tgmDMwoGx.B04@netcom.com>, tgm@netcom.com (Thomas G. McWilliams) writes:
|> William Paul Berriss (strberis) wrote:
|> : When reading in the peppers.ras file it gets the nymbers form the header BUT
|> : instead of 512 it shows (on the screen) 131072, and instead of 24 it shows
|> : something huge like 6291456. All these 'wrong' numbers can be made from
|> : other numbers, e.g. 131072 is 256 times 512. It should have been 512!
|>
|> I suspect that this is partly an endian problem. Sun is big endian and
|> DOS is little endian.
|>
For ada95 look at the "Bit_Order" attribute.
for T'Bit_Order use Highest_Bit_First;
or
for T'Bit_Order use Lowest_Bit_First;
I'm not sure this will help in your application. But you definitely
need to flip the bits around.
--
David Haverkamp
dahaverk@cca.rockwell.com
--
David Haverkamp
dahaverk@cca.rockwell.com
next parent reply other threads:[~1996-02-20 0:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4g2efj$d5d@susscsc1.rdg.ac.uk>
[not found] ` <tgmDMwoGx.B04@netcom.com>
1996-02-20 0:00 ` Dave Haverkamp [this message]
1996-02-20 0:00 ` GNAT Ada for DOS - Reading Integers Problem Norman H. Cohen
1996-02-21 0:00 ` Robert Dewar
1996-02-21 0:00 ` Norman H. Cohen
1996-02-21 0:00 ` Robert Dewar
1996-02-23 0:00 ` Robert A Duff
1996-02-23 0:00 ` Robert Dewar
[not found] ` <Dn8ItA.B9H@world.std.com>
1996-02-23 0:00 ` Robert Dewar
1996-02-24 0:00 ` Tore Joergensen
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox