comp.lang.ada
 help / color / mirror / Atom feed
From: David Morton <dmorton@jinx.sckans.edu>
Subject: access variable Q:
Date: 1996/06/16
Date: 1996-06-16T00:00:00+00:00	[thread overview]
Message-ID: <31C43F54.74E62073@jinx.sckans.edu> (raw)


How do I do the following in Ada?

int *ptr;
int i;

ptr = &i;

I know how to do dynamic stuff with an access pointer,
but I can't read anything clear in the RM
about accessing a static variable...

for instance, I have a record that I
want to have access variables  access some of the elements:

type int_ptr is access integer;
type foo is record
	a, b, c : integer;
end record;

bar : foo;

a_ptr := ??????  -- how do I make this point at bar.a  ????

please post to email, in case the news server fails...  :(

-- 
David Morton
 mailto:dmorton@jinx.sckans.edu    // If you use Netscape 2.0,
 205 College, Winfield, KS 67156   // you can click on the mailto: part to reply!
                                   (HINT, HINT)  :)




             reply	other threads:[~1996-06-16  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-06-16  0:00 David Morton [this message]
1996-06-16  0:00 ` access variable Q: Robert Dewar
1996-06-17  0:00 ` David Morton
1996-06-18  0:00 ` Jon S Anthony
1996-06-19  0:00 ` John Herro
replies disabled

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