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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3a096b168ebeb84 X-Google-Attributes: gid103376,public From: progers@acm.org (Pat Rogers) Subject: Re: Ada95 Package Bodies: Required? Date: 1996/05/02 Message-ID: <4masem$9r3@uuneo.neosoft.com>#1/1 X-Deja-AN: 152624410 references: <3188DE77.41C6@cliffy.lfwc.lockheed.com> organization: NeoSoft Internet Services +1 713 968 5800 reply-to: progers@acm.org (Pat Rogers) newsgroups: comp.lang.ada Date: 1996-05-02T00:00:00+00:00 List-Id: In <3188DE77.41C6@cliffy.lfwc.lockheed.com>, Matt Hembree 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