comp.lang.ada
 help / color / mirror / Atom feed
From: strohm@mksol.dseg.ti.com (john r strohm)
Subject: Re: How does Alsys index bit-arrays on Intel ?
Date: Mon, 22 Mar 1993 19:16:52 GMT
Date: 1993-03-22T19:16:52+00:00	[thread overview]
Message-ID: <1993Mar22.191652.16458@mksol.dseg.ti.com> (raw)
In-Reply-To: 1993Mar19.193443.524@scf.loral.com

In article <1993Mar19.193443.524@scf.loral.com> bashford@srs.loral.com (Dave Bashford) writes:
>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,...

This comes up often enough that it is worth saying.

ANSI/MIL-STD-1815A "Reference Manual for the Ada Programming Language"
section 13.4 paragraph 5 contains the following sentence:

  "The ordering of bits in a storage unit is machine-dependent and may
   extend to adjacent storage units."

The same pargraph also contains the following sentence:

  "Whether a component is allowed to overlap a storage boundary, and
   if so, how, is implementation-defined."

In other words, different compilers for different target processors are
allowed to do things differently.



  reply	other threads:[~1993-03-22 19:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-03-19 19:34 How does Alsys index bit-arrays on Intel ? Dave Bashford
1993-03-22 19:16 ` john r strohm [this message]
1993-03-23  2:39   ` Robert Kitzberger
1993-03-23 15:29     ` Norman H. Cohen
1993-03-23 20:27       ` john r strohm
1993-03-25 22:09         ` Dave Bashford
replies disabled

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