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=unavailable autolearn_force=no version=3.4.4 Path: border2.nntp.dca.giganews.com!nntp.giganews.com!goblin3!goblin2!goblin1!goblin.stu.neva.ru!news.swapon.de!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: gnatmake error I don't understand Date: Fri, 04 Apr 2014 15:58:05 -0700 Organization: Also freenews.netfront.net; news.tornevall.net Message-ID: References: <85ha69ue15.fsf@stephe-leake.org> <9412dfa1-8fae-4396-b7cf-06ea9554de6c@googlegroups.com> <9QE%u.10627$Fj3.8408@fx09.iad> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 4 Apr 2014 22:58:07 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="bd5e647da89610f9b7b0763dacbc65f9"; logging-data="24206"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+lpOKzgNhpAy3OcjTv/CHCiUAUuB1C94A=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 In-Reply-To: <9QE%u.10627$Fj3.8408@fx09.iad> Cancel-Lock: sha1:UzPtZQiT9Pm6nSk4cOoK9CYAd0Y= Xref: number.nntp.dca.giganews.com comp.lang.ada:185535 Date: 2014-04-04T15:58:05-07:00 List-Id: On 04/04/2014 01:43 PM, Shark8 wrote: > > ADS-File > ----------------------------------------- > Procedure Main; > > ADB-File > ----------------------------------------- > with Parent; > Procedure Main renames Parent.Subprogram; > > GPR-File > ----------------------------------------- > -- ... > for Main use ("ADB-File.adb"); > -- ... > > Sure the ADS-File may be extraneous, but won't hurt anything to my knowledge. It might help. There's a little trick some colleagues played on people who left their workstations unlocked. Let us say Bob is working on a program called Alice and has the main subprogram in the file Alice.adb: procedure Alice is ... end Alice; He has it to the point that he can run it, though some essential functionality is missing. We come along and create Foo.ads: package Foo is pragma Elaborate_Body; exception Bar; end Foo; Foo.adb: package body Foo is -- Nothum, eh? begin -- Foo raise Bar; end Foo; and Alice.ads: with Foo; procedure Alice; Now when he tests Alice, she raises Foo.Bar! People can spend a lot of time trying to figure that out. -- Jeff Carter "He didn't get that nose from playing ping-pong." Never Give a Sucker an Even Break 110