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,81bce7ee9133fb42 X-Google-Attributes: gid103376,public From: dahaverk@cca.rockwell.com (Dave Haverkamp) Subject: Re: GNAT Ada for DOS - Reading Integers Problem Date: 1996/02/20 Message-ID: #1/1 X-Deja-AN: 140315904 sender: news@lazrus.cca.rockwell.com x-nntp-posting-host: dizzy.cca.rockwell.com references: <4g2efj$d5d@susscsc1.rdg.ac.uk> organization: Rockwell Avionics - Collins newsgroups: comp.lang.ada originator: dahaverk@dizzy.cca.rockwell.com Date: 1996-02-20T00:00:00+00:00 List-Id: In article , 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