Re: C-->IDL / FORTRAN-->IDL searched [message #6761] |
Thu, 15 August 1996 00:00 |
steinhh
Messages: 260 Registered: June 1994
|
Senior Member |
|
|
In article <32127A95.41C6@raptor.lpl.arizona.edu>, Tim Patterson <tim@raptor.lpl.arizona.edu> writes:
|>
|> Going from C -> IDL might be impossible unles somebody wanted
|> to handle pointers anbd pinters to pointers etc.
|> But Fortran -> IDL should be easier. At least, i can think of
|> anything in F77 that can't be done in IDL. Optimizing the
|> IDL code would be the hard part if you wanted to make an efficient
|> translation.
|>
Yes, you're right about that. I guess you could *almost* convert
an f77 program to IDL through some simple search-and-replace
macros/functions in emacs, but then you'd essentially have a
slow f77 program, with f77 programming style but with IDL
syntax/semantics. Much better then, to either use call_external
fortran subroutines, or to use IDL as an RPC server from f77. Both
methods allow mixing of f77 for speed and IDL for e.g., plotting.
I don't program in Fortran so don't take the above statement
about f77->IDL by search-and-replace statements too seriously.
Stein Vidar
|
|
|
Re: C-->IDL / FORTRAN-->IDL searched [message #6769 is a reply to message #6761] |
Wed, 14 August 1996 00:00  |
Tim Patterson
Messages: 65 Registered: October 1995
|
Member |
|
|
Stein Vidar (UiO) wrote:
>
> In article <32106E36.11DF863A@phim.unibe.ch>, Simon Hefti <hefti@phim.unibe.ch> writes:
> |> Hi,
> |>
> |> has anyone written a C to IDL and/or FORTRAN to IDL converter
> |> similar to p2c or f2c ?
> |>
> |> If not I think this might be a very nice tool to have ...
>
> Indeed, but I wouldn't spend much time searching for one,
> it's quite unlikely that any such creature exists.
> Going from a "low-level" to a "high-level" language is not
> an easy task to do automatically -- it's just about impossible.
> Going the other way, from IDL->C or IDL->FORTRAN is feasible,
> though, but I haven't heard about any program that actually does
> it.
>
> Stein Vidar
Going from C -> IDL might be impossible unles somebody wanted
to handle pointers anbd pinters to pointers etc.
But Fortran -> IDL should be easier. At least, i can think of
anything in F77 that can't be done in IDL. Optimizing the
IDL code would be the hard part if you wanted to make an efficient
translation.
Tim
|
|
|
Re: C-->IDL / FORTRAN-->IDL searched [message #6772 is a reply to message #6769] |
Wed, 14 August 1996 00:00  |
steinhh
Messages: 260 Registered: June 1994
|
Senior Member |
|
|
In article <32106E36.11DF863A@phim.unibe.ch>, Simon Hefti <hefti@phim.unibe.ch> writes:
|> Hi,
|>
|> has anyone written a C to IDL and/or FORTRAN to IDL converter
|> similar to p2c or f2c ?
|>
|> If not I think this might be a very nice tool to have ...
Indeed, but I wouldn't spend much time searching for one,
it's quite unlikely that any such creature exists.
Going from a "low-level" to a "high-level" language is not
an easy task to do automatically -- it's just about impossible.
Going the other way, from IDL->C or IDL->FORTRAN is feasible,
though, but I haven't heard about any program that actually does
it.
Stein Vidar
|
|
|