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,8bc34e14e4555720 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-05 08:00:15 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!194.213.69.151!news.algonet.se!algonet!newsfeed1.uni2.dk!news.net.uni-c.dk!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Re: This is a simple question Date: Fri, 05 Oct 2001 16:59:51 +0200 Organization: Centre for Chaos and Turbulence Studies, Niels Bohr Institute Message-ID: <3BBDCAE7.1D83D9D@nbi.dk> References: <9pk4t7$tbm$1@trog.dera.gov.uk> <87zo762rta.fsf@deneb.enyo.de> <9pkc0r$m5j$1@trog.dera.gov.uk> NNTP-Posting-Host: alf.nbi.dk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.net.uni-c.dk 1002293991 28078 130.225.212.55 (5 Oct 2001 14:59:51 GMT) X-Complaints-To: usenet@news.net.uni-c.dk NNTP-Posting-Date: Fri, 5 Oct 2001 14:59:51 +0000 (UTC) X-Mailer: Mozilla 4.78 [en] (X11; U; OSF1 V4.0 alpha) X-Accept-Language: fo,da,no,sv,is,de,fr,en Xref: archiver1.google.com comp.lang.ada:13792 Date: 2001-10-05T16:59:51+02:00 List-Id: Stephen: > The problem is the gnat compiler will only accept one compilation unit per > file. Because what I am playing at seems to make a single function/procedure > into a single compilation unit, I seem to be incuring the inefficient > situation of requiring a file for each function declaration and then > definition. I am not sure it is an inefficient solution. But it is definitely a very Unix-like solution. > My real question is whether this is indeed the case, and that if you don't > use packages you will always have this situation. Is this the case with all > Ada compilers? No. > I come from a background of 'C' and am used to the #include<> > nature of things. The idea of packages seems to adstract the native file > system to another level (packages) and allows the compiler implementation to > determine where files are on the host computer. Is this so? The package/procedure/function-file relation is a GNAT specific thing. If I remember correctly GNAT has a pragma, you can use to specify that a compilation unit is in a file with another name than the one GNAT derives from the name of the compilation unit. > As for question 2. from reading this newsgroup I get the impression that > there are quite a few "bugs" in gnat?! I am only aware of two apparent defects in the current public version of GNAT. And only one of these is related to actual compilation of Ada programs. The other one is a _potential_ security hole in the compiler, when compiling on multi-user systems. This is actually quite close to a perfect system. You should appreciate that there is openness about the few remaining defects in GNAT. > Is Ada in real life as good as Ada theoretical could be? No - but that goes for any language whose formal definition isn't a specific implementation of the language (and probably also for some of those whose formal definition _is_ a specific implementation). GNAT is for example not always as agressive in its optimisation as it is theoretically and practically possible. > Is there a grading system to Ada compiler technologies? There is an official "validation suite", which is supposed to test if an Ada compiler is actually an Ada compiler, but it is not exhaustive. Jacob -- "It is very easy to get ridiculously confused about the tenses of time travel, but most things can be resolved by a sufficiently large ego."