comp.lang.ada
 help / color / mirror / Atom feed
From: hasan@ut-emx.uucp (David A. Hasan)
Subject: Re:  factoring with generics
Date: 15 Mar 91 17:39:23 GMT	[thread overview]
Message-ID: <45647@ut-emx.uucp> (raw)
In-Reply-To: loftus.5211@wpllabs.UUCP

In response to a question I asked about using a generic
subprogram in the body of a package to implement the bodies of
various subprograms exported by that package,

loftus@wpllabs.UUCP (William Loftus) writes:

>A generic instantiation introduces both a spec and body
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                   (I see...)
>(see 12.2(1) and 12.2(2)).  A generic instantiation of a procedure in a
>package body introduces a spec and body for that routine into the package
>body.  If there is a specification of a homograph in the package
>specification then there is a redeclaring of the specification of the
>subprogram in the package body, and therefore is illegal.  However, this
>has been submitted by ALWG as a consideration for Ada 9x.
>

Thank you.  The answers my question exactly.  I must admit,
however, that I still can't see how those two paragraphs of
the LRM tell me this.  Do you perhaps mean 12(1) and 12(2)?
When it says "An instance of a generic subprogram is a
subprogram", is it really telling me that a spec and body are
generated?

My confusion was doubled by the fact that the Meridian
compiler which I also use actually compiled what DEC's
wouldn't (although I did get a runtime PROGRAM_ERROR).

>Also notice that you cannot use a renames solely as an implemenation,
>either.

Yes, I've tried that in the past and had to mend my ways,
also.  Is there a 9X consideration of that?

Anyway, thanks for the help!

-- 
 |   David A. Hasan
 |   hasan@emx.utexas.edu 

      reply	other threads:[~1991-03-15 17:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1991-03-08 23:36 factoring with generics David A. Hasan
1991-03-11 21:20 ` David A. Hasan
1991-03-14  3:45   ` William Loftus
1991-03-15 17:39     ` David A. Hasan [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