Tuesday, February 07, 2006

Passing Subroutines to Other Subroutines in FORTRAN

I hope to mention this in class today. Here is a discussion of how to.

The old-fashioned, non-profile-safe way:
SUBROUTINE SUB (ACTION)
EXTERNAL ACTION
* ...
CALL ACTION (arguments)
* ...
END

SUBROUTINE DEED (args)
* ...
END

* ...
EXTERNAL DEED
CALL SUB (DEED)

No comments: