comp.lang.ada
 help / color / mirror / Atom feed
From: wojtek@power.com.pl (Wojtek Narczynski)
Subject: Re: Unchecked conversion of arrays?
Date: 14 May 2004 03:39:28 -0700
Date: 2004-05-14T03:39:28-07:00	[thread overview]
Message-ID: <5ad0dd8a.0405140239.1411a24d@posting.google.com> (raw)
In-Reply-To: 7_Soc.92431$dP1.290953@newsc.telia.net

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



  reply	other threads:[~2004-05-14 10:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-13 22:51 Unchecked conversion of arrays? Björn Persson
2004-05-14 10:39 ` Wojtek Narczynski [this message]
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