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,LOTS_OF_MONEY autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,dbcd0557f06cdbfa X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-06-15 02:21:34 PST From: "David C. Hoos, Sr." Newsgroups: comp.lang.ada References: Subject: Re: Only one compilation unit. Date: Fri, 15 Jun 2001 04:21:37 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit 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 NNTP-Posting-Host: Newsfeeds.com Message-ID: <3b29d190$1_2@Newsfeeds.com> X-Authenticated-User: 143557362 X-Comments: This message was posted through Newsfeeds.com X-Comments2: IMPORTANT: Newsfeeds.com does not condone, nor support, spam or any illegal or copyrighted postings. X-Report: Report abuse to "abuse@Newsfeeds.com" Organization: Newsfeeds.com http://www.newsfeeds.com 90,000+ UNCENSORED Newsgroups. Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!feed.textport.net!local-out2.newsfeeds.com!corp-goliath.newsfeeds.com Xref: archiver1.google.com comp.lang.ada:8771 Date: 2001-06-15T04:21:37-05:00 List-Id: Many of the questions asked on comp.lang.ada (such as this one) can be answered by reading the appropriate section of the GNAT User's Guide. The GNAT documentation not only provided the rule, but often provides the rationale for the rule. Here is the relevant section of the User's Guide: Handling Files with Multiple Units The basic compilation model of GNAT requires that a file submitted to the compiler have only one unit and there be a strict correspondence between the file name and the unit name. The gnatchop utility allows both of these rules to be relaxed, allowing GNAT to process files which contain multiple compilation units and files with arbitrary file names. gnatchop reads the specified file and generates one or more output files, containing one unit per file. The unit and the file name correspond, as required by GNAT. If you want to permanently restructure a set of "foreign" files so that they match the GNAT rules, and do the remaining development using the GNAT structure, you can simply use gnatchop once, generate the new set of files and work with them from that point on. Alternatively, if you want to keep your files in the "foreign" format, perhaps to maintain compatibility with some other Ada compilation system, you can set up a procedure where you use gnatchop each time you compile, regarding the source files that it writes as temporary files that you throw away. "McDoobie" wrote in message news:pheW6.78393$DG1.12883136@news1.rdc1.mi.home.com... > Alright, I'm writing a small program using two procedures. > > Now I'm coding both procedures within the same .adb file. When I go to > compile the program I get an error that says "end of file expected, can > only have one compilation unit." > > Now, that only happens when writing programs with more than one procedure. > > Do I have to put each different procedure in a seperate text file? Or is > it necessary to write .ads which describe each and every procedure? > Any help would be appreciated. > > Thanks. > > McDoobie > chris@dont.spam.me -----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World! -----== Over 80,000 Newsgroups - 16 Different Servers! =-----