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,FREEMAIL_FROM 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 06:20:36 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!psinet-eu-nl!psiuk-p4!uknet!diablo.dera.gov.uk!dera!not-for-mail From: "Stephen Cole" Newsgroups: comp.lang.ada Subject: Re: This is a simple question Date: Fri, 5 Oct 2001 14:25:18 +0100 Organization: Defence Evaluation & Research Agency Message-ID: <9pkc0r$m5j$1@trog.dera.gov.uk> References: <9pk4t7$tbm$1@trog.dera.gov.uk> <87zo762rta.fsf@deneb.enyo.de> NNTP-Posting-Host: 146.80.10.150 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Xref: archiver1.google.com comp.lang.ada:13780 Date: 2001-10-05T14:25:18+01:00 List-Id: Thanks for the answer so quickly. I shall investigate gnatchop. My confusion is really in trying to apply the naming scheme for packages to files that only contain functions/procedures. That is, files that do not contain the "package is....end ;" unit declaration wording or the "separate()" unit declaration wording. So stand on their own. 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. 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? 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? As for question 2. from reading this newsgroup I get the impression that there are quite a few "bugs" in gnat?! Is this a fair appraisal? Or is it user problems? I know gnat is freeware so maybe this is natural. Is this the case with more proven/certified compiler systems? I am just trying to get a feel for how high-integrity Ada is in real life. Is Ada in real life as good as Ada theoretical could be? Is there a grading system to Ada compiler technologies? I am a newbee so please forgive my aggressive questioning. "Florian Weimer" wrote in message news:87zo762rta.fsf@deneb.enyo.de... > "Stephen Cole" writes: > > > 1) > > If I want to make some child functions/procedures (which I understand is > > allowable) rather than a child package, how do I name the file in order to > > feed it into GNAT? > > The usual library unit name translation rules apply. The declarations > gets the '.ads' suffix, and the completion (if necessary) the '.adb' > suffix. > > (If you are not sure, you can put your source code into an arbitrary > file and process it with gnatchop.) > > > Do I have to create a separate Specification file for each > > procedure/function declaration? > > This depends on the compiler flags. It is generally a good idea to > supply these declarations. > > > But I have tried this with GNAT and both approaches work! > > This seems to be a defect in GNAT.