comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Carter <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: GNAT GPL is proving...educational
Date: Sun, 21 Jul 2013 22:11:32 -0700
Date: 2013-07-21T22:11:32-07:00	[thread overview]
Message-ID: <ksieii$qah$1@dont-email.me> (raw)
In-Reply-To: <be5b1878-f8f0-4448-adeb-9613f4c61b97@googlegroups.com>

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


  reply	other threads:[~2013-07-22  5:11 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-22  1:28 GNAT GPL is proving...educational Alan Jump
2013-07-22  3:26 ` Jeffrey Carter
2013-07-22  3:50   ` Alan Jump
2013-07-22  5:11     ` Jeffrey Carter [this message]
2013-07-22 22:19       ` Shark8
2013-07-22  5:28     ` Bill Findlay
2013-07-22  8:49       ` Georg Bauhaus
2013-07-22  9:04         ` Bill Findlay
2013-08-01 15:07     ` Stephen Leake
2013-08-01 19:28       ` Alan Jump
2013-07-25  5:41   ` Yannick Duchêne (Hibou57)
2013-07-25 20:25     ` J-P. Rosen
2013-07-25 23:07       ` Yannick Duchêne (Hibou57)
2013-07-22  7:18 ` Niklas Holsti
2013-07-22  8:52   ` Simon Wright
2013-07-31  2:02   ` David Thompson
2013-07-22 18:28 ` Yannick Duchêne (Hibou57)
2013-07-22 19:04   ` Alan Jump
2013-07-22 19:49     ` Ludovic Brenta
2013-07-22 19:51     ` Simon Wright
2013-07-22 20:12     ` Jeffrey Carter
2013-07-22 23:34     ` Adam Beneschan
2013-07-23  3:46       ` Shark8
2013-07-23 17:46         ` Yannick Duchêne (Hibou57)
2013-07-27  3:17       ` Randy Brukardt
2013-07-29 17:21         ` Alan Jump
2013-07-29 20:57           ` Shark8
2013-07-29 21:30             ` Adam Beneschan
2013-07-29 21:44               ` Alan Jump
2013-07-29 22:36                 ` Yannick Duchêne (Hibou57)
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox