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-12-03 06:32:22 PST Newsgroups: comp.lang.ada Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!news.tufts.edu!uunet!dca.uu.net!ash.uu.net!world!news From: Robert A Duff Subject: Re: Style: always declare subrountines? User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Sender: news@world.std.com (Mr Usenet Himself) Message-ID: Date: Tue, 3 Dec 2002 14:31:49 GMT Content-Type: text/plain; charset=us-ascii References: <3dccc023$0$304$bed64819@news.gradwell.net> <3DD847CD.A3D78EE9@adaworks.com> <3DE5F0BB.E7D21384@brighton.ac.uk> <3DEC923B.7D210577@brighton.ac.uk> <3DECAD6E.738F1C1B@brighton.ac.uk> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Organization: The World Public Access UNIX, Brookline, MA Xref: archiver1.google.com comp.lang.ada:31381 Date: 2002-12-03T14:31:49+00:00 List-Id: John English writes: > Lutz Donnerhacke wrote: > > > > My dumb brain suggests, that a privatly declared type can be used elsewhere > > in the program. If the size of this type depends on an other package, the > > using package does not notice it and allocates the wrong size. (Yep, dumb.) > > Ah, I would hope that any compiler I use has a dependency manager that > can cope with this... Indeed. Ada compilers are *required* to make sure that such inconsistencies do not happen. If you try to link a program where one file has a 64-bit type, and some other file thinks it's 32 bits, you will get an error at link time. Or, better, you use a command like AdaMagic's "adabuild" or gnat's "gnatmake", which will fix the problem automatically. See RM-10.2(27). - Bob