From: Gautier <Gautier.deMontmollin@Maths.UniNe.CH>
To: p.helbig@jb.man.ac.uk
Subject: Re: should I be interested in ada?
Date: 1999/02/15
Date: 1999-02-15T00:00:00+00:00 [thread overview]
Message-ID: <36C863E0.F79EFE5D@Maths.UniNe.CH> (raw)
In-Reply-To: 7a72e6$g55$1@probity.mcc.ac.uk
> I'm actually quite happy programming in Fortran95 but Ada seems to be
> the one language I regularly hear good things about (which also seem
> believable AND relevant to me).
>
> Is there any reason to use Ada as opposed to Fortran95 for my stuff
> (mainly number crunching, numerical analysis etc, some home-grown
> graphics software, relatively simple text processing etc; almost all
> code I use is my own)?
The pluses: see below
The minus: as for every language change there are decisions to take
with the software already done:
- translate (f2a perl script does the most)
- interface when it would take too long to translate - see example as P.S.
In terms of time, in my own project, the minus has costed me a week,
the pluses have saved me about 6 months. So far I didn't need a
debugger! It lets me plenty of time to read and answer the news 8-� !
> What are the main advantages/disadvantages of Fortran and Ada?
Ada has been conceived with the experience of mistakes done with old
languages (Fortran, C,...) and by clever people.
You'll enjoy, among others:
- readibility
- well-done variable visibility: important for large numerics programs
- strong typing which allows to catch plenty of mistakes
- bounds of arrays always obtainable (that can be save plenty of hairs
nerves, keyboards in usual Fortran programming life)
- exceptions: replaces complicated Fortran error management codes
useful when a 0 determinant should result as an error in a context
and not in another (see P.S., "raise" statements)
- modularity
- portability
The combination of the 2 latter allows me to use the same source file
containing a Finite Element library for my calculations under OpenVMS (DEC Ada)
and for the graphics program on PC (GNAT/DOS) to interpolate positions in
elements, for displaying results.
> How many platforms have ada compilers (in principle AND in practice)?
Just for the freeware GNAT, there are plenty!
Here is a list of the "official" ones: http://www.gnat.com/platforms.HTM
--
Gautier
--------
Homepage: http://www.unine.ch/math/Personnel/Assistants/Gautier/Montmollin.html
Software: http://www.unine.ch/math/Personnel/Assistants/Gautier/Gaut_FTP.htm.
PS: example of interfacing Fortran/Ada for LAPACK (perhaps could be made simpler,
but it works...)
--------------
--- DPBTRF ---
--------------
procedure DGBTRF_f(M,N, KL,KU: Natural;
AB: in out Matrix; LDAB: Positive; IPIV: out IVector;
INFO: out Integer);
PRAGMA Interface (FORTRAN, DGBTRF_f);
PRAGMA Import_Procedure(Dgbtrf_f, Dgbtrf,
Parameter_Types => (Natural,Natural,Natural,Natural,
Matrix,Positive,IVector,Integer),
Mechanism => (Reference,Reference,Reference,Reference,
Reference,Reference,Reference,Reference));
procedure DGBTRF(M,N, KL,KU: Natural;
AB: in out Matrix; LDAB: Positive; IPIV: out IVector) is
begin
DGBTRF_f(M,N,KL,KU,AB,LDAB,IPIV,INFO);
if INFO<0 then raise Illegal_value;
elsif INFO>0 then raise Computation_error;
end if;
end;
next prev parent reply other threads:[~1999-02-15 0:00 UTC|newest]
Thread overview: 89+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-02-14 0:00 should I be interested in ada? Phillip Helbig
1999-02-15 0:00 ` Marin David Condic
1999-02-23 0:00 ` David Starner
1999-02-15 0:00 ` Gautier [this message]
1999-02-16 0:00 ` Ken Thomas
1999-02-17 0:00 ` Nick Roberts
1999-02-18 0:00 ` robert_dewar
1999-02-18 0:00 ` Nick Roberts
1999-02-18 0:00 ` William Clodius
1999-02-18 0:00 ` dennison
1999-02-18 0:00 ` robert_dewar
1999-02-18 0:00 ` Nick Roberts
1999-02-18 0:00 ` Jerry Petrey
1999-02-18 0:00 ` fraser
1999-02-19 0:00 ` Matthew Heaney
1999-02-20 0:00 ` fraser
1999-02-18 0:00 ` Nick Roberts
1999-02-18 0:00 ` Joel Seidman
1999-02-18 0:00 ` Dan Nagle
1999-02-18 0:00 ` nabbasi
1999-02-19 0:00 ` Nick Roberts
1999-02-19 0:00 ` Dan Nagle
1999-02-19 0:00 ` robert_dewar
1999-02-19 0:00 ` Nick Roberts
1999-02-19 0:00 ` Dan Nagle
1999-02-23 0:00 ` Peter Hermann
1999-02-19 0:00 ` robert_dewar
1999-02-19 0:00 ` Nick Roberts
1999-02-19 0:00 ` William Clodius
1999-02-20 0:00 ` Nick Roberts
1999-02-21 0:00 ` robert_dewar
1999-02-21 0:00 ` William Clodius
1999-02-22 0:00 ` Nick Roberts
1999-02-19 0:00 ` robert_dewar
1999-02-21 0:00 ` William Clodius
1999-02-23 0:00 ` Robert I. Eachus
1999-02-18 0:00 ` William Clodius
1999-02-18 0:00 ` nabbasi
1999-02-18 0:00 ` robert_dewar
1999-02-18 0:00 ` robert_dewar
1999-02-19 0:00 ` William Clodius
1999-02-19 0:00 ` Nick Roberts
1999-02-20 0:00 ` robert_dewar
1999-02-22 0:00 ` Nick Roberts
1999-02-22 0:00 ` William Clodius
1999-02-23 0:00 ` robert_dewar
1999-02-23 0:00 ` Nick Roberts
1999-02-22 0:00 ` William Clodius
1999-02-23 0:00 ` Nick Roberts
1999-02-23 0:00 ` William Clodius
1999-02-25 0:00 ` Nick Roberts
1999-02-25 0:00 ` robert_dewar
1999-02-23 0:00 ` Robert I. Eachus
1999-02-24 0:00 ` Nick Roberts
1999-02-26 0:00 ` Robert A Duff
1999-02-27 0:00 ` Semantic info pragmas (was: should I be interested in ada?) Nick Roberts
1999-03-01 0:00 ` Samuel Tardieu
1999-03-01 0:00 ` Robert A Duff
1999-02-24 0:00 ` should I be interested in ada? William Clodius
1999-02-24 0:00 ` William Clodius
1999-02-25 0:00 ` Nick Roberts
1999-02-25 0:00 ` robert_dewar
1999-02-26 0:00 ` Nick Roberts
1999-02-18 0:00 ` robert_dewar
1999-02-19 0:00 ` Nick Roberts
1999-02-19 0:00 ` robert_dewar
1999-02-19 0:00 ` William Clodius
1999-02-19 0:00 ` Nick Roberts
1999-02-20 0:00 ` robert_dewar
1999-02-22 0:00 ` Nick Roberts
1999-02-23 0:00 ` Robert I. Eachus
1999-02-24 0:00 ` White rabbit (was: should I be interested in ada?) dennison
1999-02-25 0:00 ` Alice books " JP Thornley
1999-02-25 0:00 ` Robert I. Eachus
1999-02-22 0:00 ` should I be interested in ada? dennison
1999-02-20 0:00 ` robert_dewar
1999-02-20 0:00 ` Steve Doiel
1999-02-19 0:00 ` Phillip Helbig
1999-02-19 0:00 ` dennison
1999-02-19 0:00 ` Nick Roberts
1999-02-20 0:00 ` robert_dewar
1999-02-22 0:00 ` Nick Roberts
1999-02-19 0:00 ` William Clodius
1999-02-19 0:00 ` robert_dewar
1999-02-20 0:00 ` Hartmut H. Schaefer
1999-02-20 0:00 ` bill
1999-02-21 0:00 ` dewar
1999-02-21 0:00 ` dewar
1999-02-22 0:00 ` dennison
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox