comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: Can't use my ".ada" files with Gnat 3.09?
Date: 1997/07/22
Date: 1997-07-22T00:00:00+00:00	[thread overview]
Message-ID: <dewar.869545863@merv> (raw)
In-Reply-To: wnu3ho10fs.fsf@ms31.sp.trw.com


flower says

<<There is NOTHING in the documentation that clearly (and in plain
English) states that you CAN'T use ".ada", or at least lists the
prerequisites needed if you DO use .ada...  At best if you read
between the lines, you can imply this fact!
>>


It is all there in the users guide, what documentation are you reading?????

In the secion called File Naming Rules (not exactly an obscure title),
we find:

The default file name is determined by the name of the unit 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 lower case for all
letters except that a hyphen in the second character position is
replaced by a plus sign. The extension is @file{.ads} for a spec and
@file{.adb} for a body as shown in the following table.


Seems pretty clear to me, and no, there is nothing "standard" about using
an exception of ".ada" -- that is merely the convention used by one
particular compiler or user of a compiler in the past, and you just assumed
it was some kind of standard without any reason to.

The words you quote about file names recognized by gcc is another
issue completely. As you know gcc uses the extension of the file to
determine what language you are writing in. As you correctly noted
in your quote, gcc will assume the language is ada if the file extension
is ada, adb, or ads. But that has nothing to do with the default
conventions.

If you use other than ads and adb, you will need to follow the directions in
the docyumentation on using other than default names. If your file extension
is other than ada, adb, or ads, then you need to use a -x ada switch
to tell gcc that the file is an ada file.

But I suspect that the problem here is that in fact you do not have the
GNAT documentation at hand!

Robert Dewar
Ada Corte Technologies





      parent reply	other threads:[~1997-07-22  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <wn90z5z6u0.fsf@ms31.sp.trw.com>
1997-07-18  0:00 ` Can't use my ".ada" files with Gnat 3.09? John Howard
1997-07-19  0:00 ` Robert Dewar
     [not found]   ` <wnu3ho10fs.fsf@ms31.sp.trw.com>
1997-07-22  0:00     ` Gautier
1997-07-22  0:00     ` Robert Dewar [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