comp.lang.ada
 help / color / mirror / Atom feed
From: Jacob Sparre Andersen <sparre@nbi.dk>
Subject: Re: Ada communicating with other programs
Date: Tue, 20 Nov 2001 17:24:38 +0100
Date: 2001-11-20T17:24:38+01:00	[thread overview]
Message-ID: <3BFA83C6.E97338F8@nbi.dk> (raw)
In-Reply-To: 3BFA5654.519D8BC8@kfunigraz.ac.at

Siegfried Gonzi wrote:

> aa) Is it hard in Ada to do "semi command line programming".

Ada is certainly not usable at a command line interface, but
there exists an (experimental?) Ada-like command line
interpreter. I think it's called "bush".

> b) How easy is it in Ada to read in a file of the following structure:
> 
> Day,Time,Val1,Val2
> 01:23:2001,12:23:34,2.3445,233.34
> 02:03:2001,13:45:00,2,344,222
> 
> In Clean, I wrote a program to read in the values (after extracting from
> the string) and stored it in an array, and by the way the day and time
> has been converted to fractional days of the year.
> 
> The Clean program consits of nearly 100 lines of code. I ask here "how
> easy can it be in Ada", because I have been really depressed and asked
> myself why I have to waste my time with such things and is there a
> clearer way extracting the values.

Reasonably easy. Ada comes with a calendar package and with
functions for converting strings to built-in types. I expect
the program would take up 10 to 30 lines.

> c) Is there an aha experience when one is confronted in Ada with "not
> having the goody called garbage-collection". In Clean I am accustomed to
> garbage-collection and pointer-free programming.

You don't have to use access types (pointers) in Ada. I
haven't noticed any serious problems with not having
garbage-collection in most of my Ada run-time systems.

> d) Often visualization tools support calling foreign functions, but
> often only  C or Fortran. But will it be possible to also call a
> compiled Ada function from this tools (lets say Scilab) or must  the
> vendor of these tools explicitely support Ada?

Most (all?) Ada compilers support interfacing to other
languages. This allows you to export (and import) objects
and routines as if they were written in C, Cobol or Fortran.
So C or Fortran support should be good enough.

Jacob
-- 
"Kan det virkelig passe at liberale v�lgere skal stemme SF
 for at f� friheden til at v�lge hvilke softwareprodukter
 de bruger?"                               -- Peter Mogensen

"Kristeligt Folkeparti er nu ogs� en mulighed."     -- Jacob

"[men] de er binderavende sindssyge, og da de efter al
 sandsynlighed vil medvirke til at Dansk Folkeparti f�r
 noget at skulle have sagt, kan jeg under ingen
 omst�ndigheder udholde tanken"          -- Kristian Vilmann



  parent reply	other threads:[~2001-11-20 16:24 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-20 13:10 Ada communicating with other programs Siegfried Gonzi
2001-11-20 14:39 ` M. A. Alves
2001-11-20 15:29   ` Siegfried Gonzi
2001-11-20 15:47   ` Preben Randhol
2001-11-20 16:35     ` M. A. Alves
2001-11-20 16:44       ` Preben Randhol
2001-11-20 16:51     ` Larry Kilgallen
2001-11-20 19:27       ` Pascal Obry
2001-11-20 19:48       ` Preben Randhol
2001-11-20 20:29         ` Ted Dennison
2001-11-20 23:14     ` tmoran
2001-11-21  9:03       ` Preben Randhol
2001-11-20 16:24 ` Jacob Sparre Andersen [this message]
2001-11-20 16:55 ` Larry Kilgallen
2001-11-20 19:52   ` Mark Lundquist
2001-11-20 19:59     ` Preben Randhol
2001-11-21  2:20     ` Larry Kilgallen
replies disabled

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