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,fd3a5ba6349a6060 X-Google-Attributes: gid103376,public From: Jerry Petrey Subject: Re: should I be interested in ada? Date: 1999/02/18 Message-ID: <36CC11A1.C7A71642@hercii.mar.lmco.com>#1/1 X-Deja-AN: 445681764 Content-Transfer-Encoding: 7bit References: <7a72e6$g55$1@probity.mcc.ac.uk> <36C93BB4.1429@ecs.soton.ac.uk> <7afc1o$3mi$2@plug.news.pipex.net> <7afttr$7v3$1@nnrp1.dejanews.com> <7aganu$qsc$1@plug.news.pipex.net> Content-Type: text/plain; charset=us-ascii Organization: Lockheed Martin Corporation Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-02-18T00:00:00+00:00 List-Id: Nick Roberts wrote: > > robert_dewar@my-dejanews.com wrote in message > <7afttr$7v3$1@nnrp1.dejanews.com>... > |In article <7afc1o$3mi$2@plug.news.pipex.net>, > | "Nick Roberts" wrote: > |> Other than this, there's nothing Fortran can do that Ada > |> cannot, and quite a few things that Ada can do better. It > |> may be, in practice, that sometimes Fortran compilers > |> can/will produce faster object code, but I think this is, > |> in every case (or almost), only a matter of practice, > |> rather than a theoretical limit. > | > |Yes of course all languages are Turing complete, so of > |course you can do anything in any language, but Fortran-90 > |has many features not present in Ada. To give just one > |example, it has a much more sophisticated mechanism for > |dealing with array aggregates and array aggregate > |operations. > > Maybe I could have phrased it a little more clearly. I meant there's nothing > Fortran can do that Ada cannot also do reasonably easily. Certainly, Fortran > has some convenience notations that are not so convenient in Ada. To take > Fortran's array facilities as an example, in Fortran one can put: > > real, dimension (1:10) :: x > ... > x = 1.0 > > setting all the elements of x to 1.0 (a 'broadcast scalar'), whereas in Ada > to do the same thing, you must code something like: > > X: array (1..10) of Float; > ... > for i in X'Range loop X(i) := 1.0; end loop; > I think using an aggregate would be much better than a loop: X := (1 .. 10 => 1.0); Jerry -- ===================================================================== = Jerry Petrey - Consultant Software Engineer - Member Team Ada = = Lockheed Martin Member Team Forth = =====================================================================