comp.lang.ada
 help / color / mirror / Atom feed
From: progers@acm.org  (Pat Rogers)
Subject: Re: Ada95 Package Bodies: Required?
Date: 1996/05/02
Date: 1996-05-02T00:00:00+00:00	[thread overview]
Message-ID: <4masem$9r3@uuneo.neosoft.com> (raw)
In-Reply-To: 3188DE77.41C6@cliffy.lfwc.lockheed.com


In <3188DE77.41C6@cliffy.lfwc.lockheed.com>, Matt Hembree <HembreeMR@cliffy.lfwc.lockheed.com> writes:
>Forgive me if I prove myself irreparably ignorant, but:
>
>The document 'HOW TO PROGRAM IN Ada 9X, USING Ada 83', written by Erhard
>Ploedereder, which I obtained from the Ada Information Clearinghouse
>(AdaIC), says:
>
>   "Guideline 8:  All library unit packages must have bodies,
>    even if such bodies are empty."
>
>The 'Ada Compatibility Guide', v. 6.0, 1 Jan 95, by Bill Taylor, which I
>also got from the Ada Information Clearinghouse, says:
>
>   "28.   Library Package Bodies Illegal if not Required"  and
>
>   "In Ada95, it is illegal to providea body for a library
>    package that does not require one."
>
>What gives?  We are converting from Ada83 to Ada95, and this package
>body issue may mean many (admittedly small) changes to our code.


Package bodies are indeed not allowed unless they are actually required.
Or, as Tucker put it, "That which is not required is forbidden!" :)
If you need the body for other reasons, I suggest pragma Elaborate_Body
which will make the body required.  (Or just declare a private subprogram
in the package declaration, to have a null body in the package body, but I
don't like that approach now that the pragma is available.)

BTW, I always go by what the RM says. :)

pat
---------------
Patrick Rogers
progers@acm.org





  reply	other threads:[~1996-05-02  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-05-02  0:00 Ada95 Package Bodies: Required? Matt Hembree
1996-05-02  0:00 ` Pat Rogers [this message]
1996-05-02  0:00 ` Robert A Duff
replies disabled

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