From: Ehud Lamm <mslamm@mscc.huji.ac.il>
Subject: Re: a Newbie's question
Date: 1999/03/21
Date: 1999-03-21T00:00:00+00:00 [thread overview]
Message-ID: <Pine.A41.3.96-heb-2.07.990321004617.148318B-100000@pluto.mscc.huji.ac.il> (raw)
In-Reply-To: 36F416E2.7D459C4A@hotmail.com
Since the answers to most of your questions are specific to the compiler
you use (in your case GNAT), it is best you ask your instructor directly.
However, since these are common questions, I'll give a brief answr.
Ada modules are spilt into two parts: specification (often called spec)
and body. The spec specifies the INTERFACE of the module (which can be
subroutine, a package, a task etc.) and the body give the actual
implementation.
In the GNAT env. the extension ADS is used for spec files, and ADB for
body.
Since you are just starting out, my first guess is that you are writing a
program which consists of a "main" and maybe some internal procedures.
This means that the extension to use is ADB.
In this scenario, you code will look like this:
procedure Program_name is
procedure Internal_Subroutine_Name is
begin
end;
prcoedure Second_Routine is
begin
end;
begin -- main
end;
all inside one ADB file. You can not write more than one compilation unit
(come to class to learn what this is!) inside a file.
Hope this help.
Good luck with Ada.
Ehud Lamm mslamm@pluto.mscc.huji.ac.il
next prev parent reply other threads:[~1999-03-21 0:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-03-20 0:00 a Newbie's question Alon Rotem
1999-03-21 0:00 ` robert_dewar
1999-03-21 0:00 ` Ehud Lamm [this message]
1999-03-21 0:00 ` Matthew Heaney
1999-03-21 0:00 ` Ehud Lamm
1999-03-23 0:00 ` Jonathan Hough
1999-03-26 0:00 ` Tony Gair
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox