comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: Newbie question on child packages
Date: Wed, 09 Oct 2002 16:43:08 GMT
Date: 2002-10-09T16:43:08+00:00	[thread overview]
Message-ID: <w0Zo9.26118$7I6.89870@rwcrnsc52.ops.asp.att.net> (raw)
In-Reply-To: OgYo9.40823$Oa1.39958@nwrddc02.gnilink.net

> A child package spec called A.ads
> package JB.A is
> ...
> Here's my problem.  When I go to compile and build A I get an error from
> A.adb "file jb-A.ads not found".
> ...
> change the name of A.ads to JB.A.ads?  or JB-A.ads?
  Given the error message, it seems not unreasonable to guess the compiler
wants you to change the name to JB-A.ads

> This seems to defeat the whole point of modularity and independence?
  Hardly.  Would you be happy if the compiler searched every file on your
LAN to find one that contained "package JB.A"?  Some compilers, having
been told to compile "A.ads" will note in some kind of database that it
contains the spec of JB.A, so they can quickly find it in the future.
Some compilers don't do that and insist on a particular naming convention
so they can find the file of interest without a search.  If you are using
Gnat, it can be run either with its standard naming or you can give it a
name-file lookup table.  A third option is to run gnatchop to create files
with its naming convention from files named arbitrarily.

> Please help.  I've read the chapters on Packages and Child packages in
> Programming Ada 95 and the documentation at
> http://www.it.bton.ac.uk/staff/je/adacraft but alas no help here.
  Those documents talk about the Ada language, ie, the content of the
files.  It's purely the particular compiler's and OS's business how Ada
source code is to be stored in particular files in certain folders.  A
particular compiler could insist that source code be in 16 bit Unicode in
pgp signed files before it would compile, and that wouldn't violate any
Ada standard.  So you'll have to read the docs for your particular compiler.



      parent reply	other threads:[~2002-10-09 16:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-09 15:52 Newbie question on child packages Justin Birtwell
2002-10-09 16:12 ` Matthew Heaney
2002-10-09 16:20   ` Justin Birtwell
2002-10-09 16:54     ` Matthew Heaney
2002-10-09 18:45     ` Preben Randhol
2002-10-09 16:18 ` Jim Rogers
2002-10-09 19:16   ` Simon Wright
2002-10-09 21:06     ` Stephen Leake
2002-10-11  5:00       ` Simon Wright
2002-10-09 16:43 ` tmoran [this message]
replies disabled

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