If you are comfortable writing simple HTML documents, a simple feature of ufpp(1) allows you to easily maintain documentation, source, and links to external files all together. If you run the ufpp(1) Fortran Preprocessor on this file with the command
ufpp -html -i THISFILE.html -o THISFILE.f90the Fortran source is extracted using very simple rules: If lines begin with <xmp> start writing out the lines; quit if </xmp> is encountered.
There are three versions of subroutine ONE(). If WHICH_VERSION is not defined, the "third" version is written to output. If WHICH_VERSION = 1, version "first" is used. If WHICH_VERSION =2 , version "second" is used.