Re: Calling fortran procedures from IDL [message #11498] |
Wed, 01 April 1998 00:00 |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Torben Schmith (tsc@dmi.dk) writes:
> In the IDL manual a rather complicated procedure for calling a fortran
> procedure from idl is described. This involves writing a small interface
> routine which the again calls the 'real' fortran routine. When strings
> are to be transferred it becomes even more complicated.
>
> Do anyone know of a simpler way to do it? What I would like is simply a
> IDL routine which just calls the fortran routine...
This is putting the cart WAY ahead of the horse. What you
_end up with_ is a simple IDL routine. But if it were simple
from the get-go then all of us big-buck programmers would be out
of a job. Ain't gonna happen. :-)
Cheers,
David
P.S. Let's just say job security is NOT one of the things
that keeps me awake at night, especially with the current
object graphics documentation. :-)
P.S.S. I'm being a little facetious here, certainly. Linking
IDL to outside code is inherently difficult because so many
factors are outside of IDL's control. It is often compiler
and operating system specific, not to mention that not
everyone writes perfect Fortran (or IDL) code. It is even
more difficult when you have to link code in one language
(Fortran) to code in another language (C) because of the
inherent differences in the two languages. (Take the way
strings are handled as just one obvious example.) It requires
a lot more knowledge than it takes to just write a simple
IDL program and I doubt you could write a simple program
that took into account ALL of the possible variables. The
best you can hope for, usually, is something that works
on your machine (and, possibly, your supervisor's).
-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|