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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2d886a1f8c2fd7b,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1993-03-19 11:57:41 PST Newsgroups: comp.lang.ada Path: sparky!uunet!haven.umd.edu!darwin.sura.net!sgiblab!sgigate!sgi!wdl1!scf16!bashford From: bashford@srs.loral.com (Dave Bashford) Subject: How does Alsys index bit-arrays on Intel ? Message-ID: <1993Mar19.193443.524@scf.loral.com> Sender: bashford@scf.loral.com (Dave Bashford) Organization: Loral Space & Range Systems Distribution: inet Date: Fri, 19 Mar 1993 19:34:43 GMT Date: 1993-03-19T19:34:43+00:00 List-Id: Can anyone tell me definitively whether a packed array of bits is indexed with the least-significant index in the most- or least-significant bit of each byte on an Intel-targeted Alsys Ada compiler ? least-significant index in the least-significant bit: 7,6,5,4,3,2,1,0,15,14,13,12,11,10,9,8,23,22,... or least-significant index in the most-significant bit: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,... In other words, will the following program print 32768 or 256 or ? ----------------------------------------------------------------------------- with text_io; with unchecked_conversion; procedure tst is type Bits is range 0..1; type Streams is array( natural range 0..15) of Bits; pragma pack( Streams ); type Word is range 0..65535; for Word'size use 16; function Word_Of is new unchecked_conversion( Streams, Word ); Stream: Streams := Streams'(0 => 1, others => 0); begin text_io.put_line( Word'image(Word_Of(Stream))); end tst; ----------------------------------------------------------------------------- thanks, p.s. a follow-up and summary of the data-interoperability problem I asked about last week is coming. It keeps getting weirder and ... -- db bashford@srs.loral.com (Dave Bashford, Sunnyvale, CA)