comp.lang.ada
 help / color / mirror / Atom feed
From: Carbonne Damien <damien.carbonne@free.fr>
Subject: Re: GNAT naming convention for seperate?
Date: Sat, 23 Jun 2001 11:30:02 GMT
Date: 2001-06-23T11:30:02+00:00	[thread overview]
Message-ID: <3B349ABF.4FADC85D@free.fr> (raw)
In-Reply-To: 3b22038c_1@Newsfeeds.com

"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




  reply	other threads:[~2001-06-23 11:30 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 [this message]
2001-06-23 14:29     ` David C. Hoos, Sr.
replies disabled

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