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,4200259190b16e16 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-05 12:54:15 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!news-out.visi.com!petbe.visi.com!news.maxwell.syr.edu!sn-xit-03!sn-xit-01!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Visibility problems with package instantiations..... Date: Fri, 5 Dec 2003 14:52:38 -0600 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: <95234e08.0311270742.631b1228@posting.google.com><349csv0udb5k0kuk0q99d7tm7fh5leuefu@4ax.com><95234e08.0311280323.7a5bb870@posting.google.com><95234e08.0311302345.4f9e235b@posting.google.com> X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 X-Complaints-To: abuse@supernews.com Xref: archiver1.google.com comp.lang.ada:3161 Date: 2003-12-05T14:52:38-06:00 List-Id: "Arnaud Charlet" wrote in message news:Pine.LNX.4.44.0312051409310.14199-100000@aix.act-europe.fr... > > Note that it is incorrect to assume that only GNAT has this limitation. > > And it is also incorrect to assume or state that GNAT has this > limitation, since this is wrong. > > If GNAT (or any Ada compiler for that matter) had this limitation, it > would not be able to compile ACATS tests which contain several units per > file. > > What people meant is that the optimal, recommended and typical use of > GNAT is to have one unit per file. > > For multiple units per file, GNAT comes with gnatchop which is fully > capable of handling multiple units. What I said is that GNAT follows the *letter* of the standard, not the *spirit*. If you have to do something that the compiler and/or make tool does not recognize and do automatically if needed, then it doesn't really support it in my book. That's because you can't edit the source file with the multiple units and use the make tool to update your program. That means that you either modify the split files (at which point you no longer have multiple units in your file), or you have to rememeber to run gnatchop by hand (and the failure to do so means a lot of wasted time figuring out why something doesn't work - something I've spent a lot of time doing with Claw). Given that supporting this properly would only a few days of work (implementing it in Janus/Ada took precisely one day, and that was a lot more complex than integrating gnatchop would be), it is hard to imagine precisely why that was never done. Someone mentioned Apex as not supporting multiple files. I believe that in fact it does work if you use the command line compiler (it doesn't enforce source naming requirements). And if you just use the GUI, the source code is pretty much a useless appendage used only to communicate to non-Apex programs. Even so, it is fair to say that it too has a limitation in this area. Randy.