comp.lang.ada
 help / color / mirror / Atom feed
From: PForan <pforan@gmail.com>
Subject: using the 'use at' feature inside a record?
Date: Wed, 9 Sep 2009 13:07:51 -0700 (PDT)
Date: 2009-09-09T13:07:51-07:00	[thread overview]
Message-ID: <8f6142f2-ea37-46d7-a29c-0498da5dd9da@t13g2000yqn.googlegroups.com> (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



             reply	other threads:[~2009-09-09 20:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-09 20:07 PForan [this message]
2009-09-10  3:17 ` using the 'use at' feature inside a record? Per Sandberg
2009-09-10 23:42 ` Stephen Leake
2009-09-11 13:54   ` PForan
replies disabled

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