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

Home » Public Forums » archive » Fortran -> IDL translator
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Fortran -> IDL translator [message #2702] Wed, 31 August 1994 15:50 Go to next message
uk2 is currently offline  uk2
Messages: 8
Registered: June 1994
Junior Member
Hi,

I was thinking about the logistics of writing a programme to convert
fortran source code into IDL. But I'd like to know whether (a) It's been
done (successfully); or (b) there is some reason why it's not a worthwhile
project. If it's neither, would anyone like to collaborate ?

Pete (uk2@lpl.arizona.edu)
Re: Fortran -> IDL translator [message #2883 is a reply to message #2702] Fri, 02 September 1994 09:01 Go to previous messageGo to next message
amaravad is currently offline  amaravad
Messages: 11
Registered: September 1994
Junior Member
In article <uk2-310894155254@ulysses.lpl.arizona.edu> uk2@lpl.arizona.edu (Pete Riley) writes:
> Hi,
>
> I was thinking about the logistics of writing a programme to convert
> fortran source code into IDL. But I'd like to know whether (a) It's been
> done (successfully); or (b) there is some reason why it's not a worthwhile
> project. If it's neither, would anyone like to collaborate ?
>
> Pete (uk2@lpl.arizona.edu)


If you already have working FORTRAN code, then you may be better off
speed wise, by just doing only your interface in IDL, and then using
the IDL CALL_EXTERNAL procedure to execute the fortran code. I donot
see why you would want to translate all your code into IDL code.

Ratty




--
This is my .sig file and not yours...
Re: FORTRAN -> IDL [message #10718 is a reply to message #2702] Mon, 12 January 1998 00:00 Go to previous message
Harald Frey is currently offline  Harald Frey
Messages: 41
Registered: March 1997
Member
Kelly Dean wrote:

> I am converted some FORTRAN code into IDL, but I am confused what this
> FORTRAN statment "SINE(X)=SIN(.01745329*X) " in this function is trying
> to do.
>
> FUNCTION GETDIST (HEIGHT,ANGLE,ZENANG,SLANT)
> DATA RAD/3437.748/
> SINE(X)=SIN(.01745329*X)
> ARCSIN(X)=57.29578*ASIN(X)
> ANG=ABS(ANGLE)
> FAC=SINE(ANG)/RAD
> .
> .
> .
>
> Any hints?
>
> Kelly Dean
> CSU/CIRA

!pi/180.=0.0174533

Harald Frey
Re: FORTRAN -> IDL [message #10721 is a reply to message #2702] Sun, 11 January 1998 00:00 Go to previous message
Robert S. Hill is currently offline  Robert S. Hill
Messages: 11
Registered: January 1998
Junior Member
On Sun, 11 Jan 1998, Kevin Ivory wrote:
> Kelly Dean wrote:
>>
>> I am converted some FORTRAN code into IDL, but I am confused what this
>> FORTRAN statment "SINE(X)=SIN(.01745329*X) " in this function is trying
>> to do.
>

I think this may be a Fortran relic called a "statement function." In
that case, it would be defining a new function sine() for the scope of the
current program unit. A roughly similar thing is done nowadays in C using
a preprocessor definition with arguments.

Bob Hill
--
Robert.S.Hill.1@gsfc.nasa.gov Phone: 301-286-3624
Raytheon STX / Code 681, NASA/GSFC, Greenbelt, MD 20771
Re: FORTRAN -> IDL [message #10722 is a reply to message #2702] Sun, 11 January 1998 00:00 Go to previous message
rivers is currently offline  rivers
Messages: 228
Registered: March 1991
Senior Member
In article <34B9133C.3E4E6636@linmpi.mpg.de>, Kevin Ivory <Kevin.Ivory@linmpi.mpg.de> writes:
> Kelly Dean wrote:
>>
>> I am converted some FORTRAN code into IDL, but I am confused what this
>> FORTRAN statment "SINE(X)=SIN(.01745329*X) " in this function is trying
>> to do.
>
> It looks like it takes the angle in degrees X, calculates the sine
> and puts it into the Xth array element of the array SINE.
> Something like IDLs
> sine = sin(!dtor * x)
> where both x and sine are arrays.

No, I think this is what is called a "Statement Function" in FORTRAN. It is
basically a 1-line function definition. This one says that SINE(X) is the same
as SIN(X), except that it takes its argument in degrees rather than radians.

____________________________________________________________
Mark Rivers (773) 702-2279 (office)
CARS (773) 702-9951 (secretary)
Univ. of Chicago (773) 702-5454 (FAX)
5640 S. Ellis Ave. (708) 922-0499 (home)
Chicago, IL 60637 rivers@cars.uchicago.edu (e-mail)

or:
Argonne National Laboratory (630) 252-0422 (office)
Building 434A (630) 252-0405 (lab)
9700 South Cass Avenue (630) 252-1713 (beamline)
Argonne, IL 60439 (630) 252-0443 (FAX)
Re: FORTRAN -> IDL [message #10723 is a reply to message #2702] Sun, 11 January 1998 00:00 Go to previous message
Kevin Ivory is currently offline  Kevin Ivory
Messages: 71
Registered: January 1997
Member
Kelly Dean wrote:
>
> I am converted some FORTRAN code into IDL, but I am confused what this
> FORTRAN statment "SINE(X)=SIN(.01745329*X) " in this function is trying
> to do.

It looks like it takes the angle in degrees X, calculates the sine
and puts it into the Xth array element of the array SINE.
Something like IDLs
sine = sin(!dtor * x)
where both x and sine are arrays.

Hope this helps
Kevin
--
Kevin Ivory Tel: +49 5556 979 434
Max-Planck-Institut fuer Aeronomie Fax: +49 5556 979 240
Max-Planck-Str. 2 mailto:Kevin.Ivory@linmpi.mpg.de
D-37191 Katlenburg-Lindau, GERMANY http://www.gwdg.de/~kivory2/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL procedure to read UF data
Next Topic: Problem setting up emacs idl-shell

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

Current Time: Wed Oct 08 13:53:41 PDT 2025

Total time taken to generate the page: 0.00720 seconds