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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,91829d2306080fa8 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-10-09 09:43:08 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!wn12feed!wn11feed!worldnet.att.net!204.127.198.204!attbi_feed4!attbi_feed3!attbi.com!rwcrnsc52.ops.asp.att.net.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: Newbie question on child packages References: X-Newsreader: Tom's custom newsreader Message-ID: NNTP-Posting-Host: 12.234.13.56 X-Complaints-To: abuse@attbi.com X-Trace: rwcrnsc52.ops.asp.att.net 1034181788 12.234.13.56 (Wed, 09 Oct 2002 16:43:08 GMT) NNTP-Posting-Date: Wed, 09 Oct 2002 16:43:08 GMT Organization: AT&T Broadband Date: Wed, 09 Oct 2002 16:43:08 GMT Xref: archiver1.google.com comp.lang.ada:29624 Date: 2002-10-09T16:43:08+00:00 List-Id: > 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.