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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d927b7ea9b65580a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-09 10:36:00 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Style: always declare subrountines? Date: 09 Nov 2002 18:36:05 +0000 Organization: Pushface Sender: simon@smaug.pushface.org Message-ID: References: <3dccc023$0$304$bed64819@news.gradwell.net> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1036866960 29289 62.49.19.209 (9 Nov 2002 18:36:00 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Sat, 9 Nov 2002 18:36:00 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 Xref: archiver1.google.com comp.lang.ada:30659 Date: 2002-11-09T18:36:05+00:00 List-Id: porton@ex-code.com (Victor Porton) writes: > How do you consider this: > > If one would always declare every subrountine of a package body in the > specification (in the public or in the private part) this excludes the > possibility that one may mistakedly create an internal subrountine with > the same specification as a not yet implemented public procedure and > forget to implement this public procedure and so get wrong program > behavior. > > Stylistic checkers for always declaring in package specification? If you use -gnaty GNAT will require specs (well, it warns if there aren't any). But of course they only need be as local as required; so it's common to see procedure Foo; procedure Foo is .. in a local scope.