Table of Contents

Previous: -pretty


Option: project

-project
ftnchek will create a project file from each source file that is input while this flag is in effect. The project file will be given the same name as the input file, but with the extension .f or .for replaced by .prj . (If input is from standard input, the project file is named ftnchek.prj.) Default = no.

A project file contains a summary of information from the source file, for use in checking agreement among FUNCTION , SUBROUTINE , and COMMON usages in other files. It allows incremental checking, which saves time whenever you have a large set of files containing shared subroutines, most of which seldom change. You can run ftnchek once on each file with the -project flag set, creating the project files. Usually you would also set the -library and -noextern flags at this time, to suppress messages relating to consistency with other files. Only error messages pertaining to each file by itself will be printed at this time. Thereafter, run ftnchek without these flags on all the project files together, to check consistency among the different files. All messages internal to the individual files will now be omitted. Only when a file is altered will a new project file need to be made for it.

Naturally, when the -project flag is set, ftnchek will not read project files as input.

Project files contain only information needed for checking agreement between files. This means that a project file is of no use if all modules of the complete program are contained in a single file.

A more detailed discussion is given in the section on Using Project Files.


Next: -pure