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=-0.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no 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:55:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!psinet-eu-nl!psiuk-p4!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: This is a simple question Date: Fri, 5 Oct 2001 09:43:17 -0400 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: <9pkddm$afh$1@nh.pace.co.uk> References: <9pk4t7$tbm$1@trog.dera.gov.uk> <87zo762rta.fsf@deneb.enyo.de> <9pkc0r$m5j$1@trog.dera.gov.uk> NNTP-Posting-Host: dhcp-200-133.miami.pace.co.uk X-Trace: nh.pace.co.uk 1002289398 10737 136.170.200.133 (5 Oct 2001 13:43:18 GMT) X-Complaints-To: newsmaster@news.cam.pace.co.uk NNTP-Posting-Date: 5 Oct 2001 13:43:18 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:13785 Date: 2001-10-05T13:43:18+00:00 List-Id: The GNAT compiler relies on the file system to implement its "library" and needs the time stamp information, etc, for the files to tell what is out of date. Not all compilers work this way. Once you get used to it, it works reasonably well. If you're using AdaGide as your development environment, it can handle a whole bunch of separate little files reasonably well and will invoke the compiler properly and all that good stuff, so don't worry too much about yours specs and bodies being in separate files. If you simply like to edit a large, single file containing lots of functions and procedures (typical C style) you can do that too. (Although you have to get used to the fact that you shouldn't be trying to force Ada to be C. Learn to use it the way it is intended. However when you're starting out, its natural to do things the way you always have, so don't agonize too much initially. Just learn the language and over time you'll start to understand "The Ada Way".) Go ahead and edit everything in one file (I usually use a .CHOP extension just ro remind me.) When you have the file the way you want it, type at the DOS command prompt "gnatchop -w My_File.Chop" and it will automagically bust everything up into individual files and give them the proper names. You can then type "gnatmake My_Main_Program" and it will go figure out what needs to be recompiled and just do it. If you keep the editor in one window and the MS-DOS prompt available in another window, it is only slightly less convenient than using AdaGide with everything in separate files. Just edit/save/chop/compile as needed. (This could be an added capability of AdaGide? Hitting the "Compile" button on a .CHOP file causes a Save/Chop/Compile action?) However, I think you'll discover that it is a bit easier to just work with a directory full of relatively small files. Get used to AdaGide and you may begin to like the way it works. That, and you get the ability to highlight something and jump to its declaration, which can be pretty handy when working with a large collection of units. I'd like to see an IDE that has a representation of all the library units in an Ada directory/library on the side - sort of like MSVC++ or CodeWright. It would make navigation a little easier. MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com Web: http://www.mcondic.com/ "Stephen Cole" wrote in message news:9pkc0r$m5j$1@trog.dera.gov.uk... > 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.