Table of Contents

Previous: -pretty


Option: project

-project=list
ftnchek will create a project file from each source file that is input while this option is turned on. 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 = none.

The list consists of keywords separated by commas or colons. There are three special keywords: all to turn on all the options, none to turn them all off, and help to print the list of all the keywords with a brief explanation of each. If list is omitted, -project is equivalent to -project=all, and -noproject is equivalent to -project=none. The keywords with their meanings are as follows:

create:
Produce a project file. The default is not to produce a project file. If this option is not turned on, the other options have no effect.
trim-calls:
Trim the amount of information stored in the project file about subprogram declarations and calls. This is the default. Turn this option off only in rare situations. (See discussion below.) The amount of trimming varies depending on the -library flag. More information is trimmed if that flag is turned on.
trim-common:
Trim the number of common block declarations stored in the project file. This is the default. Turn this option off only in rare situations. (See discussion below.) This option has no effect if the -library flag is turned off: when not in library mode, no trimming of common block declarations is done regardless of this option.

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 option is turned on, ftnchek will not read project files as input.

Ordinarily, the trim options should be left on when you intend to create project files for future input to ftnchek. Since trimming is on by default, this means that simply giving the command -project with no option list is the recommended mode. The trim options are provided only as a convenience for those who want to make use of project files for purposes other than checking the program with ftnchek. To use project files for their intended purpose, the trim options should not be turned off.

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