comp.lang.ada
 help / color / mirror / Atom feed
From: mfeldman@seas.gwu.edu (Michael Feldman)
Subject: Re: File name conventions for Ada units
Date: 30 Sep 90 02:49:40 GMT	[thread overview]
Message-ID: <2190@sparko.gwu.edu> (raw)
In-Reply-To: 589@censun1.UUCP

In article <589@censun1.UUCP> cew@censun1.UUCP (SSUID Craig E Warsaw) writes:
>
>I've been using the following (the convention used in my first
>Ada class):
>
>	package spec:	package_.ada
>	package body:	package.ada
>	subunit:	package__subunit.ada
>
>I've also seen
>
>	package spec:	package_spec.ada	or package_s.ada
>	package body:	package_body.ada	or package_b.ada

Well, much of this depends upon the vagaries of the compiler. We have one
compiler that accepts _only_ filetype .a (VADS) and another that accepts _only_
filetype .ada (Irvine). It is exceedingly annoying to have to change filenames
even on the same operating system (Unix). Meridian suggests (and will accept)
.ads for a spec, .ada for a body or main. In fact, their compiler will accept
any reasonable filetype as long as it is given explicitly. If you carry the
"kind of unit" info in the filetype, then e.g. package specs and bodies can
have the same name (this is what Meridian suggests), e.g.

   package_name.ads and package_name.ada

I would go further and use .ads for a spec, .adb for a body, .ada for a
main, and maybe .sub or whatever for a subunit. Why there are compilers, in
this day and age, that limit file types to some predetermined value, is
absolutely beyond me. At most there should be a default which can always
be overridden.

Are others frustrated with these seemingly unjustifiable compiler limits?
Can some compiler folks out there justify the limitations? Maybe I'm
missing something here.
>
>By the way, there is an annoying aspect of all of these schemes.
>If I use wildcarding to print or list files, all of the package
>bodies occur before the package specs.  I'd prefer the specs
>before the bodies, but that's not too important.
My encoding above would not solve your problem, but nothing better comes to
mind at the moment.


---------------------------------------------------------------------------
Prof. Michael Feldman
Department of Electrical Engineering and Computer Science
The George Washington University
Washington, DC 20052
202-994-5253
mfeldman@seas.gwu.edu
---------------------------------------------------------------------------

  parent reply	other threads:[~1990-09-30  2:49 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1990-09-28 20:25 File name conventions for Ada units SSUID Craig E Warsaw
1990-09-29 16:29 ` stt
1990-09-29 22:04 ` Dan Rittersdorf
1990-10-01 14:56   ` David Emery
1990-10-06 14:37   ` Rik Palo
1990-09-30  2:49 ` Michael Feldman [this message]
1990-10-02 17:10   ` arny.b.engelson
1990-10-04 15:05     ` Michael Feldman
1990-10-02 21:55   ` Erland Sommarskog
1990-10-03  2:00     ` Alan Adamson
1990-10-03 17:00     ` Alex Blakemore
1990-10-04  9:37       ` Mike Harrison
1990-10-04 12:10       ` Robert Firth
1990-10-04  1:55     ` Michael Feldman
1990-10-04 17:22       ` Brian Hanafee
1990-10-08 17:33 ` Andy DeFaria
1990-10-11  8:59   ` Dan Bernstein
1990-10-12  5:29 ` Andy DeFaria
  -- strict thread matches above, loose matches on Subject: below --
1990-10-05 12:04 munck
replies disabled

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