[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to call fortran subroution?




"web" <jiali3@21cn.com> writes:

> Yes, I know that. I have read the example more then 5 times,but I have
> failed for many times too.Who can help me to modify the subroutine above(a
> much more simple example) and teach how to link them step by step? Many guys
> are interested in it. Or are there any detailed document on it? The
> explanasion of the help document is too simple.
... remainder deleted ...

Jaili--

I think Stefano is right, you can't call FORTRAN directly from IDL,
especially with the CALL_EXTERNAL method.  That method requires your
program to conform to a very specific interface for your function
parameters (two parameters named argc and argv).

I'm looking at the External Development Guide for IDL 5.2.  They
recommend a "wrapper" function written in C, which in turn calls the
FORTRAN.  That manual does give an example where the FORTRAN
subroutine can be called directly, but the semantics appear to be
present only on a few platforms (VMS or IBM AIX), and the subroutine
must still conform to the argc and argv convention.

Questions:
 * What example are you looking at?
 * Does Ronn Kling's book on external linking address FORTRAN?

Craig

-- 
--------------------------------------------------------------------------
Craig B. Markwardt, Ph.D.         EMAIL:    craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
--------------------------------------------------------------------------