Man pages sections > man1 > findent

findent - Indents and optionally converts Fortran program source

FINDENT(1) User Commands FINDENT(1)

NAME

findent - Indents and optionally converts Fortran program source

SYNOPSIS

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

DESCRIPTION

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:

-h
print this text
-H
print man page
-v
prints findent version
-q
guess free or fixed, prints 'fixed' or 'free' and exits
-l
(0/1) 1: statement labels to start of line (default:1)
(only for free format)
-lastindent
prints computed indentation of last line
(for usage with vim)
-lastusable
prints line number of last line usable
as start for indenting(for usage with vim)
-iauto
determine automatically input format (free or fixed)
-ifixed
force input format fixed (default: auto)
-ifree
force input format free (default: auto)
-Lnnn
use only first nnn characters of each line default=0: take whole lines
-Lnnng
same as above, but use gfortran convention for counting the characters with tabbed lines
-ofree
force free format output
-Rr
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
-RR
same as -Rr, but 'SUBROUTINE' in stead of 'subroutine' etc

Indenting options:

-In
starting indent (default:0)
-Ia
determine starting indent from first line
-in
all indents except I,c,C,e (default: 3)
-an
ASSOCIATE indent
-bn
BLOCK indent
-dn
DO indent
-fn
IF indent
-En
ENUM indent
-Fn
FORALL indent
-jn
INTERFACE indent
-mn
MODULE indent
-rn
FUNCTION and
SUBROUTINE indent
-sn
SELECT indent
-tn
TYPE indent
-wn
WHERE indent
-xn
CRITICAL indent
-C-
restart indent after CONTAINS
-kn
continuation indent except
for lines starting with '&'
free to free only
-k-
continuation lines not preceded
by '&' are untouched
free to free only
 
next defaults are: all - all/2
-cn
CASE negative indent
-Cn
CONTAINS negative indent
-en
ENTRY negative indent
 

Examples:

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