From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,3009af37fa605de6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-20 08:24:40 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!news1.ebone.net!news.ebone.net!news.net.uni-c.dk!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Re: Ada communicating with other programs Date: Tue, 20 Nov 2001 17:24:38 +0100 Organization: Centre for Chaos and Turbulence Studies, Niels Bohr Institute Message-ID: <3BFA83C6.E97338F8@nbi.dk> References: <3BFA5654.519D8BC8@kfunigraz.ac.at> NNTP-Posting-Host: alf.nbi.dk Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: news.net.uni-c.dk 1006273479 26302 130.225.212.55 (20 Nov 2001 16:24:39 GMT) X-Complaints-To: usenet@news.net.uni-c.dk NNTP-Posting-Date: Tue, 20 Nov 2001 16:24:39 +0000 (UTC) X-Mailer: Mozilla 4.78 [en] (X11; U; OSF1 V4.0 alpha) X-Accept-Language: fo,da,no,sv,is,de,fr,en Xref: archiver1.google.com comp.lang.ada:16725 Date: 2001-11-20T17:24:38+01:00 List-Id: 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