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,start X-Google-Attributes: gid103376,public Path: controlnews3.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!proxad.net!proxad.net!news-stoc.telia.net!news-stoa.telia.net!telia.net!masternews.telia.net.!newsc.telia.net.POSTED!not-for-mail From: =?ISO-8859-1?Q?Bj=F6rn_Persson?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031114 X-Accept-Language: sv, en-us MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Unchecked conversion of arrays? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Message-ID: <7_Soc.92431$dP1.290953@newsc.telia.net> Date: Thu, 13 May 2004 22:51:47 GMT NNTP-Posting-Host: 217.209.116.179 X-Complaints-To: abuse@telia.com X-Trace: newsc.telia.net 1084488707 217.209.116.179 (Fri, 14 May 2004 00:51:47 CEST) NNTP-Posting-Date: Fri, 14 May 2004 00:51:47 CEST Organization: Telia Internet Xref: controlnews3.google.com comp.lang.ada:566 Date: 2004-05-13T22:51:47+00:00 List-Id: Let's say I have a Wide_String that I need to convert to an array of=20 bytes. Each byte will of course contain half a Wide_Character, with the=20 other half in the next byte. Will I have to copy one character at a time = or is there a faster way to do this with representation clauses or=20 something? I'm thinking Unchecked_Conversion won't be reliable, because=20 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=20 of character data. --=20 Bj=F6rn Persson jor ers @sv ge. b n_p son eri nu