Man pages sections > man1 > findent

findent - Indents and optionally converts Fortran program source

FINDENT(1) User Commands FINDENT(1)


findent - Indents and optionally converts Fortran program source


findent [ OPTION]...
findent reads from stdin and writes to stdout.


Findent indents a Fortran source. Findent uses various kinds of indentations, see OPTIONS. Findent can convert from fixed form to free form, and can supplement single END statements, see 'Refactor' below. Errors in OPTIONS are silently ignored.

General options:

print this text
print man page
prints findent version
guess free or fixed, prints 'fixed' or 'free' and exits
(0/1) 1: statement labels to start of line (default:1)
(only for free format)
prints computed indentation of last line
(for usage with vim)
prints line number of last line usable
as start for indenting(for usage with vim)
determine automatically input format (free or fixed)
force input format fixed (default: auto)
force input format free (default: auto)
use only first nnn characters of each line default=0: take whole lines
same as above, but use gfortran convention for counting the characters with tabbed lines
force free format output
refactor blocks: a single 'end'
is, if possible, replaced by
'end subroutine <name>' or
'end function <name>' or
'end program <name>' or
'end blockdata <name>' or
'end module <name>'
where <name> is the name of the appropriate block
same as -Rr, but 'SUBROUTINE' in stead of 'subroutine' etc

Indenting options:

starting indent (default:0)
determine starting indent from first line
all indents except I,c,C,e (default: 3)
BLOCK indent
DO indent
IF indent
ENUM indent
FORALL indent
MODULE indent
SELECT indent
TYPE indent
WHERE indent
restart indent after CONTAINS
continuation indent except
for lines starting with '&'
free to free only
continuation lines not preceded
by '&' are untouched
free to free only
next defaults are: all - all/2
CASE negative indent
CONTAINS negative indent
ENTRY negative indent


indent: findent < in.f > out.f
findent -i2 -r0 < in.f > out.f convert: findent -ofree < prog.f > prog.f90 refactor 'end': findent -Rr < in.f90 > out.f90 This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
2015 findent-2.7.3