DragonFly On-Line Manual Pages

Search: Section:  


FLOW(1)                DragonFly General Commands Manual               FLOW(1)

NAME

flow - show subroutine dependence of Fortran77 programs

SYNOPSIS

flow [-hCcFfRSsUVW] file(s)

DESCRIPTION

flow is a utility which shows the SUBROUTINE dependence of a Fortran77 program. It lists the called routine names and indicates their CALL level by indention. CALL statements in the case of an IF condition are also reported but not separately marked. By default no warning is given if a called SUBROUTINE is not found in the input files. This gives the possibility to reduce the output by omitting some file names including further subroutine-calls. In addition a little statistic with the count of total, comment and source-code lines is presented. Further the number of IF statements is also given as the number of declared SUBROUTINE procedures and CALL sequences. There is no limitation of the number of given files. By use of an appropriate shell wildcards like * or ? can be used in the name(s) of the file(s).

OPTIONS

-h Print a usage message on standard output and exit. -C Print each CALL statement which is found in input. -c Each found CALL of a SUBROUTINE is reported in a file named FLOW.CALL with the name of the file where it was called and the line number. The file FLOW.CALL may be sorted in alphabetically order by the sort command. -F Print the FILE name of input which is actually on work. -f The output of the dependence is written on a file with the name of the program and the ending .FLOW instead of the screen. -r <name> Set a new starting point. Instead of starting at the PROGRAM the work is done only for the SUBROUTINE <name>. This option is useful to check all called routines out of this one. -R Omit recursive hanging. Each called SUBROUTINE is printed with all subsequent CALL statements only the first time it is invoked. At the later times only the root SUBROUTINE (=starting point) is given. -S Print each SUBROUTINE statement which is found in input. -s Each found declaration of a SUBROUTINE is reported in a file named FLOW.SUBS with the name of the file where it is declared together with the line number. The file FLOW.SUBS may be sorted in alphabetically order by the sort command. -U If a SUBROUTINE is called which is not found in the input, a warning message is given. Such a case can occur for example by system calls like CALL EXIT -V Print version number of flow and name of author. Finally the program ends. -W A warning is given if a line exceeds a length of 72 characters. Spaces at the end of the line are thereby not counted. Comment lines are not controlled. KNOWN BUGS? Recursive hanging is omitted by the option -R which has the effect, that only the first time a called SUBROUTINE is followed up to the last CALL. However if the call starts out of another level of the program, e.g. an deeper lying SUBROUTINE the consecutively following CALLs will not be printed again. This obviously shortens the output and may lead to some confusion. Be cautious! IF ... THEN ... ELSEIF(...)CALL statements are not considered to appeare in the code. (Is such a construction allowed?)

EXAMPLE

flow -U *.f | less All files with suffix .f of the current directory are used as input. A warning message will be given if a subroutine is called which is not part of any input file. The output is piped to less(1) so you can browse up and down through it during it grows. flow -V The number of the actual version is printed. flow -h You get a little help message. flow -s *.f ; sort FLOW.SUBS > SUBS.SORT Each found subroutine in all fortran files of the actual directory is written to the file FLOW.SUBS together with the file name and line number where the declaration appears. After this the sort Program is called to sort the names of the subroutines in alphabetically order. The file SUBS.SORT contains the final result. flow -scFfUW *.f This is maybe the best combination of all Options if the program is spread over several files.

AUTHOR

Dirk Geschke <geschke@physik.uni-kassel.de>

FUTURE EXTENSIONS

A formatted output into special file formats like TeX/LaTeX or Postscript is planned?

SEE ALSO

bash(1), csh(1), f77(1), ksh(1), less(1), sort(1), tcsh(1) Flow Version 0.12 7. March 1997 FLOW(1)

Search: Section: