comp.lang.ada
 help / color / mirror / Atom feed
From: "James S. Rogers" <jimmaureenrogers@worldnet.att.net>
Subject: Re: Array of bytes type
Date: 2000/05/19
Date: 2000-05-19T00:00:00+00:00	[thread overview]
Message-ID: <4kfV4.73431$fV.4551641@bgtnsc05-news.ops.worldnet.att.net> (raw)
In-Reply-To: 3924E094.6B03B5BD@concentric.net


Joseph P Vlietstra wrote in message <3924E094.6B03B5BD@concentric.net>...
>2. Use Stream_Element_Array.
>   We do a lot of UC between our byte arrays and other data types.
>   (Commmands come in and telemetry goes out in byte arrays.)
>   This approach allows the possibility of using 'Read and 'Write
>   to perform conversions on the byte array (using memory stream).
>   The problem, of course, is that Stream_Element is implementation
>   defined and need not match Storage_Element.
>   BTW: Does anyone know of an implementation where Stream_Element
>   doesn't match Storage_Element?

Ada a matter of fact, yes. Some implementations of streams will use the
size of the base type as the stream element size, no matter what is
specified
for the 'Size attribute.

My project found the only reliable work-around for that compiler was to
convert all bytes to and from characters when using streams.

>5. Any other ideas?

One more possibility:

type Byte is mod 2**8;

type Byte_Array is array(Positive range <>) of Byte;

Jim Rogers
Colorado Springs, Colorado USA






      parent reply	other threads:[~2000-05-19  0:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-19  0:00 Array of bytes type Joseph P Vlietstra
2000-05-19  0:00 ` Marin D. Condic
2000-05-19  0:00 ` DuckE
2000-05-19  0:00 ` Jeff Carter
2000-05-20  0:00   ` Ken Garlington
2000-05-19  0:00 ` Ken Garlington
2000-05-21  0:00   ` Robert Dewar
     [not found]     ` <8gae49$tr5$1@slb7.atl.mindspring.net>
2000-05-22  0:00       ` Marin D. Condic
2000-05-22  0:00         ` Jean-Pierre Rosen
2000-05-22  0:00         ` Ken Garlington
2000-05-22  0:00           ` Marin D. Condic
2000-05-22  0:00           ` David Kristola
2000-05-23  0:00             ` Paul Warren
2000-05-19  0:00 ` James S. Rogers [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