From: Matthew Heaney <matthew_heaney@acm.org>
Subject: Re: I have a question about the "record" in ADA
Date: 1999/06/03
Date: 1999-06-03T00:00:00+00:00 [thread overview]
Message-ID: <m3zp2hl1tt.fsf@mheaney.ni.net> (raw)
In-Reply-To: 7i453r$l5m$1@wanadoo.fr
"mike" <blsoul@hotmail.com> writes:
> Sorry for my bad English :)
> How could I do to access to the different part of a record which is
> a generic parameter in a generic package?
> because my function in my package must acces in the record.
> Mike
One way is to just declare the record type in its own package:
package RP is
type RT is
record
X, Y : Integer;
end record;
end RP;
with RP;
generic
...
package GP is ...;
If the record type is itself part of a generic package, then you can
import an instantiation:
generic
...
package GRP is
type RT is record ...;
end GRP;
with GRP;
generic
with package RP is new GRP (...);
...
package GP is ...;
See also the Strategy example in the ACM patterns archive. A storage
management package imports a storage node (record) type using the
technique described above.
<http://www.acm.org/archives/patterns.html>
prev parent reply other threads:[~1999-06-03 0:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-05-21 0:00 I have a question about the "record" in ADA mike
1999-05-21 0:00 ` dennison
1999-05-22 0:00 ` Dale Stanbrough
1999-06-03 0:00 ` Matthew Heaney [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