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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,cfe6bee6cb133ace,start X-Google-Attributes: gid103376,public X-Google-Thread: 1094ba,3e0895d4223034d7 X-Google-Attributes: gid1094ba,public From: essoft@ix.netcom.com Subject: Re: Fortran Myths & Disinformation Wanted Date: 1999/02/11 Message-ID: <36C3BEA7.F96F80FC@ix.netcom.com>#1/1 X-Deja-AN: 443506669 Content-Transfer-Encoding: 7bit References: <87g18d3lsv.fsf@bglbv.my-dejanews.com> <19990210201511.04389.00000245@ng-fx1.aol.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Eclipse Software X-NETCOM-Date: Thu Feb 11 9:41:30 PM PST 1999 Mime-Version: 1.0 Newsgroups: comp.lang.fortran,comp.lang.ada Date: 1999-02-11T21:41:30-08:00 List-Id: Dan Tex1 wrote: > >> Fortran can also be fairly terse, if you just use the f77 way: > >> > >> function f(a, x) > >> g(x) = 1-a*x**2 > >> f = sin(g(2*x)) - cos(g(x/2)) > >> end > > > >That example is a little too simple to be interesting. Anyway, > >here is the Ada 95 version: > > > >with Ada.Numerics.Elementary_Functions; > >use Ada.Numerics.Elementary_Functions; > > > >function F (A, X: Float) return Float is > > > > function G (X: Float) return Float is > > begin > > return 1.0-A*X**2; > > end G; > >begin > > return Sin(G(2.0*X))-Cos(G(X/2.0)); > >end F; > > > > I've heard some good things about Ada. However, I've never seen any Ada code > until now. Looking at the example above though.... for simple mathematical > manipulations at least... I think I'll stick with Fortran. I find the above > Ada example to be a bit too verbose and "non-natural" to read. Is the rest of > the language like that? It gets worse exponentially -- a few years back I saw a rotational dynamics problem OOPed in ADA and in a "Fortran style**" ADA -- thirty pages of code vs page and a half, that would've shrunk further had it been in Fortran... Just like a picture is worth a thousand words, so are the little parallel code snippets that should periodically be shipped to disciples elsewhere... after all, seeing is believing!? ** Before giving in to the packaging urge and start hiding everything in sight in where_in_hell_is _that damn_thing_package. Oh yes, they love verbosity -- you're lucky if you can find some actual code here and there... -- Dr.B.Voh ----------------------------------------------- Modeling * Simulation * Analysis http://www.netcom.com/~essoft -----------------------------------------------