Painless Module Extraction

EXTRACT is a FORTRAN90 program which pulls a copy of a FORTRAN block data, function, module, program or subroutine from a big file, and saves the copy in a little file.

I've found EXTRACT extremely useful, as an alternative to printing out a huge library of routines, or using an editor to extract the seven routines I need from a collection of 200.


extract module file.f
where If the module is found, it is written to a file named module.f.


The computer code and data files made available on this web page are distributed under the GNU LGPL license.


EXTRACT is available in a FORTRAN90 version

Related Data and Programs:

CATALOG, a C++ program which reads a C, C++, FORTRAN77 or FORTRAN90 program and prints every line that begins with a special index tag. If the program has been marked up expecting this convention, it is a handy way of making a table of contents of a program file.

F77_CLEANUP, a FORTRAN90 program which makes a copy of a FORTRAN77 file in which some minor cleanups have been made.

FIXCON, a FORTRAN90 program which reads a FORTRAN file using FORTRAN77 continuation statements, and makes a copy that uses FORTRAN90 continuation instead.

F90SPLIT, a FORTRAN90 program which reads a FORTRAN file and creates individual files for every subroutine or function in the file.

HTMLINDEX, a C++ program which reads a FORTRAN program and writes a skeleton HTML page describing it, assuming that each subroutine includes a '!!' or 'cc' description line.

INCLUDE_FILES, a FORTRAN90 program which reads a FORTRAN program with INCLUDE statements, and makes a copy with the indicated files included.

MODULE_MARK, a FORTRAN90 program which replaces bare "END" statements by "END (module name)" statements in a FORTRAN90 file.

Source Code:

Examples and Tests:

List of Routines:

You can go up one level to the FORTRAN90 source codes.

Last revised on 17 August 2010.