comp.lang.ada
 help / color / mirror / Atom feed
* Filename for packages?
@ 1998-10-04  0:00 Renwick Preston
  1998-10-04  0:00 ` Tucker Taft
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Renwick Preston @ 1998-10-04  0:00 UTC (permalink / raw)


I just started looking into Ada and I'm unsure how to name my files. Should the package
specification filename end with a .ads and the body a .adb? I can't find that information
in the book Ada 95... by Feldman.
Thanks,
Ren






^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Filename for packages?
  1998-10-04  0:00 Filename for packages? Renwick Preston
@ 1998-10-04  0:00 ` Tucker Taft
  1998-10-05  0:00   ` dewarr
  1998-10-04  0:00 ` Chris Morgan
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 14+ messages in thread
From: Tucker Taft @ 1998-10-04  0:00 UTC (permalink / raw)


Renwick Preston (rpreston@phoenix.net) wrote:

: I just started looking into Ada and I'm unsure how to name my files. Should the package
: specification filename end with a .ads and the body a .adb? 

This is not standardized across Ada compilers.  Here are some
conventions that different compilers use:

   GNAT        spec = *.ads, body = *.adb
   Rational    spec = *.1.ada, body = *.2.ada
   VADS        spec = *_.a, body = *.a
   Aonix       any of the above are OK; another is:
                 spec = *.spc, body = *.bdy
   Green Hills <same as Aonix>

Given the easy availability of GNAT, I suspect that *.ads/*.adb is the
most widely used convention at this point.

: ... I can't find that information
: in the book Ada 95... by Feldman.

It's not standardized at the language level.  Probably *.ads/*.adb is
the safest choice these days.

: Thanks,
: Ren

--
-Tucker Taft   stt@inmet.com   http://www.inmet.com/~stt/
Intermetrics, Inc.  Burlington, MA  USA
An AverStar Company




^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Filename for packages?
  1998-10-04  0:00 Filename for packages? Renwick Preston
  1998-10-04  0:00 ` Tucker Taft
@ 1998-10-04  0:00 ` Chris Morgan
  1998-10-05  0:00 ` dewarr
  1998-10-05  0:00 ` dennison
  3 siblings, 0 replies; 14+ messages in thread
From: Chris Morgan @ 1998-10-04  0:00 UTC (permalink / raw)


Renwick Preston <rpreston@phoenix.net> writes:

> I just started looking into Ada and I'm unsure how to name my
> files. Should the package specification filename end with a .ads and
> the body a .adb?

Yes, that's a good way to do it.

>I can't find that information in the book Ada 95... by Feldman.

Actually you can call them anything you like. You can even put the
whole program in one file if you like. Prof Feldman's book isn't
compiler specific (which is the right decision IMHO). However should
you wish to try out the GNU Ada compiler (GNAT) you will find it
convenient to use the naming scheme expected by default by that
compiler. What I used to do, rather than worry about it, was write the
code and then get the compiler to chop up my code into the correctly
names files using the gnatchop tool - see the (excellent) GNAT
documentation if interested. Personally I see no reason not to use
this naming scheme whatever Ada compiler you intend to use, it just
makes things simpler IMHO.

Cheers,

Chris

-- 
Chris Morgan <mihalis at ix.netcom.com> http://www.netcom.com/~mihalis




^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Filename for packages?
  1998-10-04  0:00 Filename for packages? Renwick Preston
  1998-10-04  0:00 ` Tucker Taft
  1998-10-04  0:00 ` Chris Morgan
@ 1998-10-05  0:00 ` dewarr
  1998-10-05  0:00 ` dennison
  3 siblings, 0 replies; 14+ messages in thread
From: dewarr @ 1998-10-05  0:00 UTC (permalink / raw)


In article <36176A49.2D6C05CA@phoenix.net>,
  Renwick Preston <rpreston@phoenix.net> wrote:
> I just started looking into Ada and I'm unsure how to name my files. Should
the package
> specification filename end with a .ads and the body a .adb? I can't find that
information
> in the book Ada 95... by Feldman.


An Ada 95 text book is not a substitute for compiler documentation. The answer
to your question is that it varies from one compiler to another (this has
nothing to do with the language itself), and to find the answer for your
compiler, read the documentation that comes with it. For example, in the case
of GNAT, there is a chapter of the users guide called "File Naming Rules".
If you are trying to use a compiler without the documentation, stop, and
find and read the documentation, you will save yourself a lot of wasted time.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Filename for packages?
  1998-10-04  0:00 ` Tucker Taft
@ 1998-10-05  0:00   ` dewarr
  1998-10-05  0:00     ` Peter Hermann
  0 siblings, 1 reply; 14+ messages in thread
From: dewarr @ 1998-10-05  0:00 UTC (permalink / raw)


In article <F0B04u.L04.0.-s@inmet.camb.inmet.com>,
  stt@houdini.camb.inmet.com (Tucker Taft) wrote:
> Renwick Preston (rpreston@phoenix.net) wrote:
>
> : I just started looking into Ada and I'm unsure how to name my files. Should
the package
> : specification filename end with a .ads and the body a .adb?
>
> This is not standardized across Ada compilers.  Here are some
> conventions that different compilers use:
>
>    GNAT        spec = *.ads, body = *.adb
>    Rational    spec = *.1.ada, body = *.2.ada
>    VADS        spec = *_.a, body = *.a
>    Aonix       any of the above are OK; another is:
>                  spec = *.spc, body = *.bdy
>    Green Hills <same as Aonix>
>
> Given the easy availability of GNAT, I suspect that *.ads/*.adb is the
> most widely used convention at this point.
>
> : ... I can't find that information
> : in the book Ada 95... by Feldman.
>
> It's not standardized at the language level.  Probably *.ads/*.adb is
> the safest choice these days.
>
> : Thanks,
> : Ren


Note that GNAT has mechanisms for handling arbitrary file names. Those listed
above are simply the default names. For information on how to deal with naming
of files in GNAT, consult the secret archives (namely the section in the
GNAT documentation, obscurely titled "Default File Names" :-)


-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Filename for packages?
  1998-10-05  0:00   ` dewarr
@ 1998-10-05  0:00     ` Peter Hermann
  1998-10-05  0:00       ` dewarr
  1998-10-05  0:00       ` dennison
  0 siblings, 2 replies; 14+ messages in thread
From: Peter Hermann @ 1998-10-05  0:00 UTC (permalink / raw)


dewarr@my-dejanews.com wrote:

> of files in GNAT, consult the secret archives (namely the section in the
                                ^^^^^^
You certainly must have a master degree in psychology  ;-)

<break topic>

GNAT3.10p under DOS works fine!
I am really thankful to those, who have spent their time
to achieve this. Now, I can forward that compiler to a lot 
of students with DOS/Win3.11 systems.

-- 
Peter Hermann Tel+49-711-685-3611 Fax3758 ica2ph@csv.ica.uni-stuttgart.de
Pfaffenwaldring 27 Raum 114, D-70569 Stuttgart Uni Computeranwendungen
http://www.csv.ica.uni-stuttgart.de/homes/ph/
Team Ada: "C'mon people let the world begin" (Paul McCartney)




^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Filename for packages?
  1998-10-05  0:00     ` Peter Hermann
@ 1998-10-05  0:00       ` dewarr
  1998-10-05  0:00         ` Gautier.DeMontmollin
  1998-10-05  0:00         ` Markus Kuhn
  1998-10-05  0:00       ` dennison
  1 sibling, 2 replies; 14+ messages in thread
From: dewarr @ 1998-10-05  0:00 UTC (permalink / raw)


In article <6v9t8v$ldu$1@infosun2.rus.uni-stuttgart.de>,
  Peter Hermann <ica2ph@alpha1.csv.ica.uni-stuttgart.de> wrote:
> dewarr@my-dejanews.com wrote:
>
> > of files in GNAT, consult the secret archives (namely the section in the
>                                 ^^^^^^
> You certainly must have a master degree in psychology  ;-)
>
> <break topic>
>
> GNAT3.10p under DOS works fine!
> I am really thankful to those, who have spent their time
> to achieve this. Now, I can forward that compiler to a lot
> of students with DOS/Win3.11 systems.


It's certainly nice to see the DOS version of GNAT finally appear, but I
must say I am suprized that you have a "lot of students with DOS/Win3.11
systems". These days when you can buy a perfectly fine Win/95 preconfigured
system for a few hundred dollars, we very rarely run into this, if at all.
I did a poll on my current undergraduate class, and of about 30 people, one
was a Mac person, 5 were running Linux, and the rest either Windows 95 or
Win NT. None were running DOS or 3.1, and in fact, another entertaining
milestone, almost none had ever run these systems EVER :-)

My guess is that we will see more and more students running Linux on their
PC's, and I think it is probably a useful thing to encourage that. Quite a
few of my students are real Linux experts at this stage.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Filename for packages?
  1998-10-04  0:00 Filename for packages? Renwick Preston
                   ` (2 preceding siblings ...)
  1998-10-05  0:00 ` dewarr
@ 1998-10-05  0:00 ` dennison
  3 siblings, 0 replies; 14+ messages in thread
From: dennison @ 1998-10-05  0:00 UTC (permalink / raw)


In article <36176A49.2D6C05CA@phoenix.net>,
  Renwick Preston <rpreston@phoenix.net> wrote:
> I just started looking into Ada and I'm unsure how to name my files. Should
the package
> specification filename end with a .ads and the body a .adb? I can't find that
information
> in the book Ada 95... by Feldman.

That's because the language doesn't specify that. In theory you can name your
source code files anything you want. In practice every Ada compilation system
has a preferred naming system. Checking your compiler documentation would be a
good idea.

Your suggested ".ads" and ".adb" are quite likly to be a good choice. Both
gnat and the popular Intermetrics front end used by several other compilers
prefer source files that way.

--
T.E.D.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Filename for packages?
  1998-10-05  0:00     ` Peter Hermann
  1998-10-05  0:00       ` dewarr
@ 1998-10-05  0:00       ` dennison
  1 sibling, 0 replies; 14+ messages in thread
From: dennison @ 1998-10-05  0:00 UTC (permalink / raw)


In article <6v9t8v$ldu$1@infosun2.rus.uni-stuttgart.de>,
  Peter Hermann <ica2ph@alpha1.csv.ica.uni-stuttgart.de> wrote:

> GNAT3.10p under DOS works fine!
> I am really thankful to those, who have spent their time
> to achieve this. Now, I can forward that compiler to a lot
> of students with DOS/Win3.11 systems.

While you're forwarding that stuff, I have a couple boxes of love beads and
groovy 8-track tapes they might be interested in too. :-)


--
T.E.D.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Filename for packages?
  1998-10-05  0:00       ` dewarr
@ 1998-10-05  0:00         ` Gautier.DeMontmollin
  1998-10-05  0:00           ` dewar
  1998-10-05  0:00         ` Markus Kuhn
  1 sibling, 1 reply; 14+ messages in thread
From: Gautier.DeMontmollin @ 1998-10-05  0:00 UTC (permalink / raw)


> It's certainly nice to see the DOS version of GNAT finally appear, but I
> must say I am suprized that you have a "lot of students with DOS/Win3.11
> systems". These days when you can buy a perfectly fine Win/95 preconfigured
> system for a few hundred dollars, we very rarely run into this, if at all.
> I did a poll on my current undergraduate class, and of about 30 people, one
> was a Mac person, 5 were running Linux, and the rest either Windows 95 or
> Win NT. None were running DOS or 3.1, and in fact, another entertaining
> milestone, almost none had ever run these systems EVER :-)

I just want to add some comments (no polemic):

- If people having Windows 95 believe never having run DOS, they have maybe not
  very often switched on their computer. Well, the "Starting Windows 95..."
  message is a bit deceiving and could confuse beginners.

- The DPMI server is one of the things which suffers the least of subtle
  differences between DOS/Win3.x, DOS/Win4.0 ("Win95") and Windows NT.
  No surprise that people are interested in shipping DLL-free 32-bit
  programs compiled with GNAT/DOS in order to run under Windows *.* .
  Of course it doesn't concern students, so I stop here...

-- 
Gautier

--------
Homepage: http://www.unine.ch/math/Personnel/Assistants/Gautier/Montmollin.html
Software: http://www.unine.ch/math/Personnel/Assistants/Gautier/Gaut_FTP.htm





^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Filename for packages?
  1998-10-05  0:00       ` dewarr
  1998-10-05  0:00         ` Gautier.DeMontmollin
@ 1998-10-05  0:00         ` Markus Kuhn
  1 sibling, 0 replies; 14+ messages in thread
From: Markus Kuhn @ 1998-10-05  0:00 UTC (permalink / raw)


A related question:

Why does GNAT 3.10p on Linux have for its library files the old
8+3 compressed file names instead of more natural long file names?

A lot can be learned by new GNAT users by reading the library source
code, however, I found that the compressed DOS-ish filenames like
g-hesora.adb are much less encouraging to have a look into the files
then the corresponding full names (GNAT-Heap_Sort_A.adb).

It would be nice if GNAT 3.11p on Linux would not adhere any more
to late 1970s QDOS filesystem restrictions.

Markus

-- 
Markus G. Kuhn, Security Group, Computer Lab, Cambridge University, UK
email: mkuhn at acm.org,  home page: <http://www.cl.cam.ac.uk/~mgk25/>




^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Filename for packages?
  1998-10-05  0:00         ` Gautier.DeMontmollin
@ 1998-10-05  0:00           ` dewar
  1998-10-05  0:00             ` Jerry van Dijk
  1998-10-05  0:00             ` Michael F Brenner
  0 siblings, 2 replies; 14+ messages in thread
From: dewar @ 1998-10-05  0:00 UTC (permalink / raw)


In article <4OKLHRmCBjbX@nedcu4>,
  Gautier.DeMontmollin@maths.unine.ch wrote:
> - The DPMI server is one of the things which suffers the least of subtle
>   differences between DOS/Win3.x, DOS/Win4.0 ("Win95") and Windows NT.
>   No surprise that people are interested in shipping DLL-free 32-bit
>   programs compiled with GNAT/DOS in order to run under Windows *.* .
>   Of course it doesn't concern students, so I stop here...


Indeed, we certainly expected an interest in the DOS version precisely because
of this issue (generating applications that can run across Win 3.1/DOS, Win95,
and NT) and that is indeed why we maintained and supported the DOS version
for a while, but in fact no such interest every materialized. Not even one
customer expressed interest in the DOS version for this purpose, which is
why support was dropped. The only interest that was ever shown was for
students running old machines.

Robert Dewar
Ada Core Technologies

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Filename for packages?
  1998-10-05  0:00           ` dewar
  1998-10-05  0:00             ` Jerry van Dijk
@ 1998-10-05  0:00             ` Michael F Brenner
  1 sibling, 0 replies; 14+ messages in thread
From: Michael F Brenner @ 1998-10-05  0:00 UTC (permalink / raw)


 > Indeed, we certainly expected an interest in the DOS version 
 > precisely because of this issue (generating applications that 
 > can run across Win 3.1/DOS, Win95, and NT) and that is indeed 
 > why we maintained and supported the DOS version for a while, 
 > but in fact no such interest every materialized. Not even one
 > customer expressed interest in the DOS version for this purpose, which is
 > why support was dropped. 

Yes, that is true about those particular customers.

 > The only interest that was ever shown was for
 > students running old machines.

Please remember, that there are other categories of people who 
expressed interest besides students and customers. If you don't
remember, I will volunteer that I am one of them.





^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Filename for packages?
  1998-10-05  0:00           ` dewar
@ 1998-10-05  0:00             ` Jerry van Dijk
  1998-10-05  0:00             ` Michael F Brenner
  1 sibling, 0 replies; 14+ messages in thread
From: Jerry van Dijk @ 1998-10-05  0:00 UTC (permalink / raw)


dewar@gnat.com wrote:

:   Gautier.DeMontmollin@maths.unine.ch wrote:
: > - The DPMI server is one of the things which suffers the least of subtle
: >   differences between DOS/Win3.x, DOS/Win4.0 ("Win95") and Windows NT.


: Indeed, we certainly expected an interest in the DOS version precisely because
: of this issue (generating applications that can run across Win 3.1/DOS, Win95,
: and NT)

And OS/2... :-)

Jerry.
-- 
-- Jerry van Dijk  | email: jdijk@acm.org
-- Leiden, Holland | member Team-Ada
-- Ada & Win32: http://stad.dsl.nl/~jvandyk




^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~1998-10-05  0:00 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-10-04  0:00 Filename for packages? Renwick Preston
1998-10-04  0:00 ` Tucker Taft
1998-10-05  0:00   ` dewarr
1998-10-05  0:00     ` Peter Hermann
1998-10-05  0:00       ` dewarr
1998-10-05  0:00         ` Gautier.DeMontmollin
1998-10-05  0:00           ` dewar
1998-10-05  0:00             ` Jerry van Dijk
1998-10-05  0:00             ` Michael F Brenner
1998-10-05  0:00         ` Markus Kuhn
1998-10-05  0:00       ` dennison
1998-10-04  0:00 ` Chris Morgan
1998-10-05  0:00 ` dewarr
1998-10-05  0:00 ` dennison

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