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 20:26:10 -0700
Date: 2013-07-21T20:26:10-07:00	[thread overview]
Message-ID: <ksi8d0$5qn$1@dont-email.me> (raw)
In-Reply-To: <c87917bb-ecd1-4c2d-a5e9-3290ab2ca958@googlegroups.com>

On 07/21/2013 06:28 PM, Alan Jump wrote:
>
> package Stacks.Vector is
>
> one must use
>
> package Stacks_Vector is
>
> and then save the file as Stacks_Vector.ads.

Stacks.Vector is a child package; its parent is package Stacks. Package Stacks 
must exist to have child packages.

GNAT's default naming rules expect the specification of package Stacks_Vector to 
be in a file named stacks_vector.ads (all lower case) with its body in 
stacks_vector.adb. (Package Stacks.Vector would be in a files named 
stacks-vector.ad[sb].) Ada has nothing to say about source file names. Many 
compilers will accept any file names you care to use.

GNAT also requires one compilation unit per source file, but this again is not 
something defined by the language, and many compilers will accept files 
containing multiple compilation units. Many experienced Ada software engineers 
find having a single compilation unit per file a good idea.

-- 
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  3:26 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 [this message]
2013-07-22  3:50   ` Alan Jump
2013-07-22  5:11     ` Jeffrey Carter
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