Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Using "/" As Dot Replacement with GNAT

4 views
Skip to first unread message

Michael Rohan

unread,
Dec 27, 2008, 6:24:45 PM12/27/08
to
Hi Folks,

Has anyone had any success using "/" as the dot replacement for file
names with GNAT, i.e., the spec file for the package A.B.C would be a/
b/c.ads? This would give a structure similar to the Java source
structure.

Take care,
Michael.

Jean-Pierre Rosen

unread,
Dec 29, 2008, 5:45:21 AM12/29/08
to
Michael Rohan a écrit :
I doubt it would work, since neither DOS/Windows nor Unix allows "/" in
file names. Under Unix, "/" is the *only* character not allowed in file
names!

--
---------------------------------------------------------
J-P. Rosen (ro...@adalog.fr)
Visit Adalog's web site at http://www.adalog.fr

Georg Bauhaus

unread,
Dec 29, 2008, 7:00:48 AM12/29/08
to
Jean-Pierre Rosen wrote:
> Michael Rohan a écrit :
>> Hi Folks,
>>
>> Has anyone had any success using "/" as the dot replacement for file
>> names with GNAT, i.e., the spec file for the package A.B.C would be a/
>> b/c.ads? This would give a structure similar to the Java source
>> structure.
>>
> I doubt it would work, since neither DOS/Windows nor Unix allows "/" in
> file names. Under Unix, "/" is the *only* character not allowed in file
> names!

IIUC, the OP would like the unit A.B.C to live in file
C.ads in directory B which lives in directory A.

I would guess that since there is already support for -I
in GNAT, using directory nesting as a match for child
package placement could be added.

Ivan Levashew

unread,
Jan 1, 2009, 8:20:15 AM1/1/09
to
> Has anyone had any success using "/" as the
> dot replacement for file names with GNAT,
> i.e., the spec file for the package A.B.C
> would be a/b/c.ads? This would give a

> structure similar to the Java source
> structure.

This structure is specific to Eclipse IDE,
not to Java as whole.

XCode, for instance, does nothing to
support Eclipse-style directory
structure.

Personally, I prefer .NET-style filenames
(Mixed_Case.Dot_Separated.adb).

Configuration pragmas allow to do
any file naming conventions:

http://www.adacore.com/wp-content/files/
auto_update/gnat-unw-docs/html/gnat_ugn_11.html#SEC112

Per Sandberg

unread,
Jan 1, 2009, 10:27:23 AM1/1/09
to
In theory it may work but in order to keep other tools then just the
compiler happy i would strongly recommend to use the standard GCC naming
conventions.
The project i work with professionally was using the APEX naming
convention that at least has support from the GNAT tool chain but there
are hiccups so we are considering a massive rename.
My recommendation would be:
* Stay with GCC naming convention for files i you don't want trouble.

/Per

Martin Krischik

unread,
Jan 5, 2009, 2:31:57 AM1/5/09
to
Michael Rohan schrieb:

I tried that - but it did not work out in the end. In fact: any other
attempt on changing the naming convention failed as well when project
size increased.


Martin
--
mailto://kris...@users.sourceforge.net
Ada programming at: http://ada.krischik.com

0 new messages