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-Thread: 103376,fb9cb88204b780c2 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns14feed!worldnet.att.net!attbi_s22.POSTED!53ab2750!not-for-mail From: "Jeffrey R. Carter" User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: simple programs -> one file with gps 2008 (gpl)? References: <6g3k63Fe28ukU1@mid.individual.net> In-Reply-To: <6g3k63Fe28ukU1@mid.individual.net> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 12.201.97.213 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s22 1218227144 12.201.97.213 (Fri, 08 Aug 2008 20:25:44 GMT) NNTP-Posting-Date: Fri, 08 Aug 2008 20:25:44 GMT Organization: AT&T ASP.att.net Date: Fri, 08 Aug 2008 20:25:44 GMT Xref: g2news1.google.com comp.lang.ada:1567 Date: 2008-08-08T20:25:44+00:00 List-Id: Marcus Lauster wrote: > > I'm new to Ada and therefore I'm digging through the book "Programming > in Ada 2005". In Chapter 4 on Page 57 the autor states: "Complete simple > Programms might be presented in a single file." Furthermore he outlines > the structure of how such a simple program might look. The operative word here is "might". There's not much in the ARM about source files or the relationship of compilation units to source files. There's nothing in the ARM to prevent a compiler from accepting multiple compilation units in a single file, but there's also nothing to require it. GNAT, the compiler you're using, does not accept multiple compilation units in a single file. To ease migration of code from other compilers that do, it provides the gnatchop program that will break a file containing multiple compilation units into multiple files, each containing a single unit. > I typed a program with similar structure into GPS 2008 (GPL) and while > trying to compile the GPS compiler aborted with the following message GPS is an IDE, not a compiler. By default it uses the GNAT compiler, so no doubt you're using GNAT 2008. > So my question is how to convince the underlying compiler of GPS that my > program is a simple program. I'm not aware of any way to get GNAT to accept multiple compilation units in a single file. -- Jeff Carter "We call your door-opening request a silly thing." Monty Python & the Holy Grail 17