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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,695f23160a3223e X-Google-Attributes: gid103376,public Path: controlnews3.google.com!postnews1.google.com!not-for-mail From: wojtek@power.com.pl (Wojtek Narczynski) Newsgroups: comp.lang.ada Subject: Re: Unchecked conversion of arrays? Date: 14 May 2004 03:39:28 -0700 Organization: http://groups.google.com Message-ID: <5ad0dd8a.0405140239.1411a24d@posting.google.com> References: <7_Soc.92431$dP1.290953@newsc.telia.net> NNTP-Posting-Host: 62.111.211.178 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1084531168 1849 127.0.0.1 (14 May 2004 10:39:28 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 14 May 2004 10:39:28 +0000 (UTC) Xref: controlnews3.google.com comp.lang.ada:578 Date: 2004-05-14T03:39:28-07:00 List-Id: Bj�rn, > I'm thinking Unchecked Conversion won't be reliable, because > if for example the byte array is packed and Wide String is not, then (on > a 32-bit machine) I'll get two bytes of garbage between every two bytes > of character data. Wide_String is packed, says gnatpsta. I don't know if it is part of the standard. Unchecked_Conversion will check sizes for you, so I don't think you need to worry about garbage. You do need to remember about endian-ness, though. Regards, Wojtek