f90doc — Fortran 90 source code scanner

f90doc can be used either as a command line tool or as a module.

Command line usage

When used as a command line program it reads from the Fortran source files given as arguments and writes LaTeX source to stdout. The program accepts the following options:

-t <title>

specify a title.

-a <author>

specify an author.

-i <intro>

specify introductory LaTeX file to be included.


don’t use an introductory LaTeX file.


use short documentation format.


write latex output to stdout.

Module usage

The only function that is designed to be used when f90doc is imported as a module is read_files(). The classes f90doc.C_prog, f90doc.C_module, f90doc.C_subt, f90doc.C_funct, f90doc.C_decl and f90doc.C_interface contain the implementation of LaTeX output code, with each class represnting structures in the Fortran code.


Read Fortran 90 sources from the list of filenames in_files, and return a tuple (programs, modules, functs, subts).

programs is a list of pairs of instances of f90doc.C_prog and program names, modules is a list of pairs of instances of f90doc.C_module and module names, functs is a list of pairs of instances of f90doc.C_funct and function names subts is a list of pairs of instances of f90doc.C_subt and subroutine names

For example, to print the names of all modules defined in a list of filenames in_files:

programs, modules, functs, subts = f90doc.read_files(in_files)
for mod, name in modules:
   print name