comp.lang.ada
 help / color / mirror / Atom feed
From: "Björn Persson" <spam-away@nowhere.nil>
Subject: Unchecked conversion of arrays?
Date: Thu, 13 May 2004 22:51:47 GMT
Date: 2004-05-13T22:51:47+00:00	[thread overview]
Message-ID: <7_Soc.92431$dP1.290953@newsc.telia.net> (raw)

Let's say I have a Wide_String that I need to convert to an array of 
bytes. Each byte will of course contain half a Wide_Character, with the 
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 
something? 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.

-- 
Björn Persson

jor ers @sv ge.
b n_p son eri nu




             reply	other threads:[~2004-05-13 22:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-13 22:51 Björn Persson [this message]
2004-05-14 10:39 ` Unchecked conversion of arrays? Wojtek Narczynski
2004-05-14 17:34   ` Georg Bauhaus
2004-05-15  1:11   ` Jeffrey Carter
2004-05-15 10:20     ` Björn Persson
2004-05-16 19:44 ` Nick Roberts
replies disabled

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