comp.lang.ada
 help / color / mirror / Atom feed
* stream_element array contiguity
@ 2003-06-27 17:07 Ian Leroux
  2003-06-27 18:20 ` Robert I. Eachus
  2003-06-27 18:29 ` Randy Brukardt
  0 siblings, 2 replies; 3+ messages in thread
From: Ian Leroux @ 2003-06-27 17:07 UTC (permalink / raw)


From reading previous posts, I gather that a common approach to
dealing with bitwise input is to use Unchecked_Conversion to transform
to packed arrays of Boolean from arrays of Stream_Element, obtained
from an appropriate Stream package. Given that Stream_Element'Size is
not guaranteed to be a multiple or factor of Storage_Element'Size, is
there any way of being sure that the elements of a Stream_Element
array will be contiguous? If not, is there any standard way of
avoiding the problem whereby padding bits in the Stream_Element array
corrupt the resulting boolean array?

I realize that on most compilers and platforms this is unlikely to be
a real issue, but I'm wondering if there is any way to be sure (since
being sure about this sort of thing is one of the features I find
appealing about Ada).

I am a newcomer to the language, and would be glad to be called on any
factual errors in this post.

Ian Leroux



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-06-27 18:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-27 17:07 stream_element array contiguity Ian Leroux
2003-06-27 18:20 ` Robert I. Eachus
2003-06-27 18:29 ` Randy Brukardt

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