From: ian_leroux@fastmail.fm (Ian Leroux)
Subject: stream_element array contiguity
Date: 27 Jun 2003 10:07:32 -0700
Date: 2003-06-27T17:07:32+00:00 [thread overview]
Message-ID: <abac65e4.0306270907.60d7f10f@posting.google.com> (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
next reply other threads:[~2003-06-27 17:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-27 17:07 Ian Leroux [this message]
2003-06-27 18:20 ` stream_element array contiguity Robert I. Eachus
2003-06-27 18:29 ` Randy Brukardt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox