comp.lang.ada
 help / color / mirror / Atom feed
From: "David C. Hoos, Sr." <david.c.hoos.sr@ada95.com>
To: <comp.lang.ada@ada.eu.org>
Subject: Re: GNAT naming convention for seperate?
Date: Sat, 23 Jun 2001 09:29:37 -0500
Date: 2001-06-23T09:29:37-05:00	[thread overview]
Message-ID: <mailman.993306633.24419.comp.lang.ada@ada.eu.org> (raw)
In-Reply-To: 3B349ABF.4FADC85D@free.fr

You are quite correct.  I had quoted the rule from memory, rather than
looking it up.  In my mind, I had precluded the possibility of ever
needing the special rule, because I would never name a unit with the
initial identifier having only one character in its name -- i.e., a name
like 'A' is not sufficiently descriptive to use.

----- Original Message -----
From: "Carbonne Damien" <damien.carbonne@free.fr>
Newsgroups: comp.lang.ada
To: <comp.lang.ada@ada.eu.org>
Sent: June 23, 2001 6:30 AM
Subject: Re: GNAT naming convention for seperate?


> "David C. Hoos, Sr." a �crit :
>
> > The naming convention for separates is the same as the naming
> > convention for any unit.
> >
> > The rule is that any dot (.) in the unit name is replaced by a
> > dash (-) in the filename, and that all letters in the filename are
> > lower case.
>
> GNAT documentation 3.13p (File Naming Rule) says:
> -------------------------------------------
> The default file name is determined by the name of the unit that the file
> contains. The name is formed by taking the full expanded name of the unit
and
> replacing the separating dots with
> hyphens and using lowercase for all letters.
>
> An exception arises if the file name generated by the above rules starts
with
> one of the characters a,g,i, or s, and the second character is a minus. In
this
> case, the character tilde is used in
> place of the minus. The reason for this special rule is to avoid clashes
with
> the standard names for child units of the packages System, Ada, Interfaces,
and
> GNAT, which use the prefixes
> s- a- i- and g- respectively.
>
> The file extension is `.ads' for a spec and `.adb' for a body. The following
> list shows some examples of these rules.
>
> `main.ads'
>      Main (spec)
> `main.adb'
>      Main (body)
> `arith_functions.ads'
>      Arith_Functions (package spec)
> `arith_functions.adb'
>      Arith_Functions (package body)
> `func-spec.ads'
>      Func.Spec (child package spec)
> `func-spec.adb'
>      Func.Spec (child package body)
> `main-sub.adb'
>      Sub (subunit of Main)
> `a~bad.adb'
>      A.Bad (child package body)
> -------------------------------------------
> So there are cases where '.' is replaced by '~'
>
> Damien
>
> _______________________________________________
> comp.lang.ada mailing list
> comp.lang.ada@ada.eu.org
> http://ada.eu.org/mailman/listinfo/comp.lang.ada
>




      reply	other threads:[~2001-06-23 14:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-08 16:52 GNAT naming convention for seperate? Harry E. Tucker
2001-06-09  6:36 ` Simon Wright
2001-06-09 11:16 ` David C. Hoos, Sr.
2001-06-23 11:30   ` Carbonne Damien
2001-06-23 14:29     ` David C. Hoos, Sr. [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