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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,235763d9b1b2155a,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-27 10:07:33 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: ian_leroux@fastmail.fm (Ian Leroux) Newsgroups: comp.lang.ada Subject: stream_element array contiguity Date: 27 Jun 2003 10:07:32 -0700 Organization: http://groups.google.com/ Message-ID: NNTP-Posting-Host: 206.167.202.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1056733652 24655 127.0.0.1 (27 Jun 2003 17:07:32 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 27 Jun 2003 17:07:32 GMT Xref: archiver1.google.com comp.lang.ada:39829 Date: 2003-06-27T17:07:32+00:00 List-Id: >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