From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f02b102d63b5d10 X-Google-Attributes: gid103376,public From: Matthew Heaney Subject: Re: I have a question about the "record" in ADA Date: 1999/06/03 Message-ID: #1/1 X-Deja-AN: 485298652 References: <7i453r$l5m$1@wanadoo.fr> NNTP-Posting-Date: Thu, 03 Jun 1999 08:45:38 PDT Newsgroups: comp.lang.ada Date: 1999-06-03T00:00:00+00:00 List-Id: "mike" 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.