comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.not.jrcarter@acm.not.spam.org>
Subject: Re: Separate type for byte arrays
Date: Thu, 04 May 2006 18:15:36 GMT
Date: 2006-05-04T18:15:36+00:00	[thread overview]
Message-ID: <cxr6g.715672$084.315441@attbi_s22> (raw)
In-Reply-To: <87irolhpzo.fsf@mid.deneb.enyo.de>

Florian Weimer wrote:
> 
> I'm not interested in machines which use strange character sets such
> as EBCDIC, or machines whose storage unit or stream element size is
> not 8 bit.

It's not clear what you're asking. I would think all low-level I/O would 
be done in terms of bytes/storage elements/stream elements; anything 
else (such as String) would be a higher-level abstraction on top of this.

Anyway, given an 8-bit machine, you probably want 
System.Storage_Elements.Storage_Array or 
Ada.Streams.Stream_Element_Array rather than your own byte array type. 
Note that conversions to and from Storage_Array can be done with 
Ada.Storage_IO, avoiding Unchecked_Conversion. Similar things can be 
done with Streams, but it takes a bit more work than using Storage_IO.

-- 
Jeff Carter
"All citizens will be required to change their underwear
every half hour. Underwear will be worn on the outside,
so we can check."
Bananas
29



      parent reply	other threads:[~2006-05-04 18:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-04 13:35 Separate type for byte arrays Florian Weimer
2006-05-04 14:21 ` Frank J. Lhota
2006-05-04 15:14   ` Florian Weimer
2006-05-04 16:17 ` Dmitry A. Kazakov
2006-05-04 18:15 ` Jeffrey R. Carter [this message]
replies disabled

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