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: border1.nntp.ams3.giganews.com!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: GNAT GPL is proving...educational Date: Sun, 21 Jul 2013 22:11:32 -0700 Organization: Also freenews.netfront.net; news.tornevall.net Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 22 Jul 2013 05:05:23 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="68bb7ebc916066bb85146425b2aa8565"; logging-data="26961"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18TBslcUhyCjHFM9v7w0mnqI2IrkP31n0Q=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: Cancel-Lock: sha1:/b3CPuMDcLbHCrJXTdgnLFyQK8w= X-Original-Bytes: 2808 Xref: number.nntp.dca.giganews.com comp.lang.ada:182618 Date: 2013-07-21T22:11:32-07:00 List-Id: On 07/21/2013 08:50 PM, Alan Jump wrote: > > Tried it. Didn't work. GNAT responded "stacks.vector.ads language unknown". > (Or something like that. I didn't write down the exact error message; I > changed the filename and refactored the references from Stacks.Vector to > Stacks_Vector and the problem went away. And yes, the Stacks interface > package already existed.) I would have to see what you have for each package, and the names of the files you have them in, to be sure what's going on. but I can assure you that GNAT will accept child packages; I've used them many times. One thing to note, given your mention of "stacks.vector.ads" is that the file name replaces dots in the Ada name with hypens; package Stacks.Vector should be in file "stacks-vector.ads". > Here's another neophyte question, then...are specs and bodies considered > separate compilation units? GNAT also complained when I tried to write a > specification and body for a package in a single file. This may also have > been me still learning GPS' options, and if they do have to be in separate > files to keep GNAT happy without diving too deeply into options I don't need > to be futzing with as a learner, so much the better. And like I pointed out, > keeping them in separate files and generating a body stub from the > specification does a lot in keeping me honest. Yes, package specifications and bodies are separate compilation units. -- Jeff Carter "If a sperm is wasted, God gets quite irate." Monty Python's the Meaning of Life 56