comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: IDL -> FORTRAN translator?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: IDL -> FORTRAN translator? [message #4936 is a reply to message #4924] Wed, 23 August 1995 00:00 Go to previous messageGo to previous message
grunes is currently offline  grunes
Messages: 68
Registered: September 1993
Member
In article <41ctj7$oph@news.bu.edu> dlmatt@bu.edu (David Matthews) writes:
> We are writing a lot of IDL code to analyze large data sets. A colleague at
> another institution doesn't want to use IDL, wants us to provide Fortran
> source to do the same jobs. Has anyone written a program to run on unix or VMS
> that will translate IDL source (*.pro) into Fortran? I recognize that the IDL
> approach is sufficiently different from Fortran that it might be very hard to
> do a complete job automatically, but Fortran equivalents to IDL are sometimes
> given in the IDL manuals.

If you get any useful responses, please share them with the news group.
I, for one would find any translater between IDL or PV-WAVE and any
compiled language, or the reverse, to be quite useful.

The problem is inherently dificult, in fact almost insoluable, since
compiled languages like Fortran require compile-time information about
symbols that is often dificult to obtain in interpreted languages like
IDL.

The obvious way of dealing with that--changing each symbol
reference to a subroutine call, which interprets stack contents, or some
such structure--is not only inefficient, but it would be unreadable.

(In a sense that was once done--the initial implementation of
IDL was written in Fortran.)

Some time ago (13 Jul 1995) I posted the reverse question:

> Do converters exist to translate Fortran or C into IDL or PV-WAVE?
>
> Obviously, a lot of posts have asked the reverse, and the
> answer always has to be that an Interpreter like IDL or PV-WAVE
> allows symbols to change their meanings (one moment it is a scalar integer,
> the next it is a character array, the next it is a procedure...) in such a
> way that it would be very hard to generate efficient code in a
> compiled language like Fortran or C.
>
> But this direction should mostly be possible. And some of us would
> find it quite useful. (But I don't want to write it.) It would be
> especially useful if it had the option of taking some (perhaps user
> labeled) Fortran 77 loops and convert them into array operations.

I got a response from knipp@ipi.uni-hannover.de. Unfortunately
it was fairly primitive, made some strong assumptions about the
code and the way (e.g., case) in which it was coded, and would
only work on a certain classof quite simple programs. E.G.,
no dimensioned variables, etc. But it did some of the work, by
changing "program" to "pro", ** to ^, .eq. to eq, etc.

------------------------------------------------------------ -------------
Mitchell R Grunes. Opinions are mine alone.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Pvwave for Linux ?
Next Topic: Re: IDL -> Fortran: Summary

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 11:35:52 PDT 2025

Total time taken to generate the page: 0.63862 seconds