comp.lang.ada
 help / color / mirror / Atom feed
From: "Marin David Condic" <dont.bother.mcondic.auntie.spam@[acm.org>
Subject: Re: This is a simple question
Date: Fri, 5 Oct 2001 09:43:17 -0400
Date: 2001-10-05T13:43:18+00:00	[thread overview]
Message-ID: <9pkddm$afh$1@nh.pace.co.uk> (raw)
In-Reply-To: 9pkc0r$m5j$1@trog.dera.gov.uk

The GNAT compiler relies on the file system to implement its "library" and
needs the time stamp information, etc, for the files to tell what is out of
date. Not all compilers work this way. Once you get used to it, it works
reasonably well. If you're using AdaGide as your development environment, it
can handle a whole bunch of separate little files reasonably well and will
invoke the compiler properly and all that good stuff, so don't worry too
much about yours specs and bodies being in separate files.

If you simply like to edit a large, single file containing lots of functions
and procedures (typical C style) you can do that too. (Although you have to
get used to the fact that you shouldn't be trying to force Ada to be C.
Learn to use it the way it is intended. However when you're starting out,
its natural to do things the way you always have, so don't agonize too much
initially. Just learn the language and over time you'll start to understand
"The Ada Way".)

Go ahead and edit everything in one file (I usually use a .CHOP extension
just ro remind me.) When you have the file the way you want it, type at the
DOS command prompt "gnatchop -w My_File.Chop" and it will automagically bust
everything up into individual files and give them the proper names. You can
then type "gnatmake My_Main_Program" and it will go figure out what needs to
be recompiled and just do it. If you keep the editor in one window and the
MS-DOS prompt available in another window, it is only slightly less
convenient than using AdaGide with everything in separate files. Just
edit/save/chop/compile as needed. (This could be an added capability of
AdaGide? Hitting the "Compile" button on a .CHOP file causes a
Save/Chop/Compile action?)

However, I think you'll discover that it is a bit easier to just work with a
directory full of relatively small files. Get used to AdaGide and you may
begin to like the way it works. That, and you get the ability to highlight
something and jump to its declaration, which can be pretty handy when
working with a large collection of units.

I'd like to see an IDE that has a representation of all the library units in
an Ada directory/library on the side - sort of like MSVC++ or CodeWright. It
would make navigation a little easier.

MDC
--
Marin David Condic
Senior Software Engineer
Pace Micro Technology Americas    www.pacemicro.com
Enabling the digital revolution
e-Mail:    marin.condic@pacemicro.com
Web:      http://www.mcondic.com/


"Stephen Cole" <s_k_cole@yahoo.com> wrote in message
news:9pkc0r$m5j$1@trog.dera.gov.uk...
> Thanks for the answer so quickly. I shall investigate gnatchop. My
confusion
> is really in trying to apply the naming scheme for packages to files that
> only contain functions/procedures. That is, files that do not contain the
> "package <name> is....end <name>;" unit declaration wording or the
> "separate(<package name>)" unit declaration wording. So stand on their
own.
>
> The problem is the gnat compiler will only accept one compilation unit per
> file. Because what I am playing at seems to make a single
function/procedure
> into a single compilation unit, I seem to be incuring the inefficient
> situation of requiring a file for each function declaration and then
> definition.
>
> My real question is whether this is indeed the case, and that if you don't
> use packages you will always have this situation. Is this the case with
all
> Ada compilers? I come from a background of 'C' and am used to the
#include<>
> nature of things. The idea of packages seems to adstract the native file
> system to another level (packages) and allows the compiler implementation
to
> determine where files are on the host computer. Is this so?
>
> As for question 2. from reading this newsgroup I get the impression that
> there are quite a few "bugs" in gnat?! Is this a fair appraisal? Or is it
> user problems? I know gnat is freeware so maybe this is natural. Is this
the
> case with more proven/certified compiler systems? I am just trying to get
a
> feel for how high-integrity Ada is in real life. Is Ada in real life as
good
> as Ada theoretical could be? Is there a grading system to Ada compiler
> technologies?
>
> I am a newbee so please forgive my aggressive questioning.






  parent reply	other threads:[~2001-10-05 13:43 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-05 11:23 This is a simple question Stephen Cole
2001-10-05 12:29 ` Florian Weimer
2001-10-05 13:25   ` Stephen Cole
2001-10-05 13:43     ` Ted Dennison
2001-10-05 13:43     ` Marin David Condic [this message]
2001-10-05 20:17       ` David Bolen
2001-10-09 17:56         ` Marin David Condic
2001-10-09 19:15           ` Ted Dennison
2001-10-09 19:40             ` Ehud Lamm
2001-10-09 20:30               ` James Rogers
2001-10-09 20:52                 ` Ehud Lamm
2001-10-10  6:07                 ` GRASP (was Re: This is a simple question) Simon Wright
2001-10-12  1:31                   ` James Rogers
2001-10-12 13:54                     ` Simon Wright
2001-10-12 16:34                       ` M. A. Alves
2001-10-13  7:40                         ` Simon Wright
2001-10-12 19:08                       ` Matthew Woodcraft
2001-10-09 22:13           ` This is a simple question David Bolen
2001-10-10 14:27             ` Marin David Condic
2001-10-10 19:14               ` Ted Dennison
2001-10-10 20:36               ` Stephen Leake
2001-10-11 13:30                 ` Ted Dennison
2001-10-11  1:01               ` David Bolen
2001-10-11  7:29                 ` Florian Weimer
2001-10-11 13:11                 ` Stephen Leake
2001-10-11 14:56                 ` Marin David Condic
2001-10-11 15:02                   ` Pat Rogers
2001-10-11 17:16                   ` Georg Bauhaus
2001-10-19  1:12                     ` Barry Kelly
2001-10-20 12:19                     ` Florian Weimer
2001-10-11 18:07                   ` Jean-Marc Bourguet
2001-10-10 17:36             ` Stephen Leake
2001-10-10 18:27             ` Florian Weimer
2001-10-11  1:04               ` David Bolen
2001-10-10 17:30           ` Warren W. Gay VE3WWG
2001-10-10 17:58             ` Pascal Obry
2001-10-10 20:39               ` Stephen Leake
2001-10-11 17:05               ` Warren W. Gay VE3WWG
2001-10-10 18:16             ` Larry Kilgallen
2001-10-11 17:17               ` Warren W. Gay VE3WWG
2001-10-10 18:23             ` Florian Weimer
2001-10-10 18:44               ` Pascal Obry
2001-10-11 13:35                 ` Ted Dennison
2001-10-11 17:09                 ` Warren W. Gay VE3WWG
2001-10-15 17:53                   ` Warren W. Gay VE3WWG
2001-10-16 18:06                     ` Georg Bauhaus
2001-10-17 17:13                       ` Warren W. Gay VE3WWG
2001-10-18 13:55                         ` Stephen Leake
2001-10-18 16:09                           ` Warren W. Gay VE3WWG
2001-10-18 18:15                             ` Matthew Woodcraft
2001-10-18 20:52                               ` Warren W. Gay VE3WWG
2001-10-20  9:24                                 ` Matthew Woodcraft
2001-11-09 21:13                                 ` [OT] emacs Matthew Woodcraft
2001-10-11 16:44               ` This is a simple question Georg Bauhaus
2001-10-05 21:00       ` Pat Rogers
2001-10-05 14:59     ` Jacob Sparre Andersen
2001-10-05 17:20       ` Florian Weimer
2001-10-10 10:08       ` Stephen Cole
2001-10-10 16:09         ` Florian Weimer
2001-10-11 13:37         ` Ted Dennison
2001-10-05 17:56     ` Florian Weimer
2001-10-05 17:45 ` Jeffrey Carter
replies disabled

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