in reply to perl calling FORTRAN calling perl?

Are you trying to create a Perl script UI to an executable, or are you planning on using a fortran library as part of a Perl program?
If the former, then I suggest creating an interactive fortran program that take in all arguments via STDIN (interactively, though). Once you have that, you can easily create a simple Perl (or even shell) front end that creates whatever interface you want around it. I actually recommend a shell script in this case.

#!/bin/sh ./myexe <<EOF arg1 arg2 ... argN EOF

If the latter, then I have no idea. And I am confused because it sounds like you are saying that fortran (77) subs take subroutine (the fortran kind) as arguments. I don't think that is true.

Finally, if you are thinking about calling a Perl program via fortran's "system" call, I have one bit of advice - don't. Figure out a way around this if at all possible.

Replies are listed 'Best First'.
Re^2: perl calling FORTRAN calling perl?
by Anonymous Monk on Sep 25, 2007 at 17:52 UTC
    I had thought about creating a perl script UI to an executable calling a specific function in the Dierckx fitpack. However, many of the routines there require work arrays which contain temporary results, and the function has to be called again with an integer flag changed to have it calculate the final results. Since I am planning on thousands of data points for the function of most interest, the floating point work array would need to be dimensioned at something like 500,000 elements, which would all need to be read in from STDIN. It just didn't look like a workable solution.

    FORTRAN has been able have a subroutine/function name as an argument to a subroutine/function for a long time. There are lots of math problems which require this.