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, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9b2c6dfe50790879 X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: Fortran 77 to Ada Date: 1999/11/22 Message-ID: <81bp45$43r$1@nnrp1.deja.com>#1/1 X-Deja-AN: 551646287 References: <18cf8f9c.09c1c234@usw-ex0108-062.remarq.com> <38361943.813C2E20@acenet.com.au> X-Http-Proxy: 1.0 x43.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Mon Nov 22 15:56:56 1999 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-11-22T00:00:00+00:00 List-Id: In article <38361943.813C2E20@acenet.com.au>, Geoff Bull wrote: > Below is the header which should help you find it. > Don't be put off by the Ada-95, I don't recall seeing anything > generated that wasn't Ada-83 (apart from some complete rubbish, > of course. Since, it's GPL'd, I can mail it to you if you can't > find it on the web. Actually it is quite impossible to generate a general Fortran to Ada-83 translator, with any kind of reasonable quality in the output. Why? Because it is part of the fundamental semantics of Fortran that arrays are stored in column major order, and programs can and do depend on this. As a result, if you are translating code for multi-dimensional fortran arrays into Ada 83, you have no choice but to manually linearize all arrays into single dimension arrays, a step that will badly damage the semantic level of the output. In Ada 95, the pragma Convention (Fortran, ...) that ensures column major order for an annex G compliant compiler (*) helps to generate reasonable code in far more cases [though if your translator promises 100% conversion, then indeed it would still have to do nasty things like pass all arrays by explicit use of the Address attribute] (*) note to T.E.D. yes, this is implementation advice (see RM 3.6.2 (11)). But of course the reason this is IA is precisely that it would be hard to formalize this requirement. You should certainly make sure that any Ada compiler you are going to be using in a Fortran context supports this important feature! Sent via Deja.com http://www.deja.com/ Before you buy.