comp.lang.ada
 help / color / mirror / Atom feed
* using the 'use at' feature inside a record?
@ 2009-09-09 20:07 PForan
  2009-09-10  3:17 ` Per Sandberg
  2009-09-10 23:42 ` Stephen Leake
  0 siblings, 2 replies; 4+ messages in thread
From: PForan @ 2009-09-09 20:07 UTC (permalink / raw)


Hi all,

I have a question about the "use at" feature and how it can be used
inside a record to simulate C's unions. I often have an array of
bytes, as well as a string which is "use at"'ed on top of the byte
buffer, very useful as I can play with the data in any way I choose.
i.e.

byte_buf: array(1..100) of unsigned_8;
str_buf: string(1..100);
for str_buf use at byte_buf'address;

Is it possible to have something like this within a record?

TIA,
Phil



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-09-11 13:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-09 20:07 using the 'use at' feature inside a record? PForan
2009-09-10  3:17 ` Per Sandberg
2009-09-10 23:42 ` Stephen Leake
2009-09-11 13:54   ` PForan

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