plusFORT is a suite of tools for Fortran programmers. The main components are summarized below.
The primary analysis and restructuring tool of plusFORT. SPAG processes Fortran 77 with all common extensions, and almost all Fortran 90/95. It can also translate Fortran 77 to Fortran 95.
A global static analysis tool.
A coverage analysis reporting tool.
A version selection tool.
A small file-splitting utility.
A tool for minimal recompilation of Fortran and C programs.
In this manual we refer often to the different Fortran standards (Fortran 66, Fortran 77, Fortran 90 and Fortran 95). In general we use the term "Fortran 95" to mean "current Fortran including features not supported by Fortran 77" rather than to distinguish it from Fortran 90. In truth, the differences between Fortran 90 and 95 are relatively minor. Fortran 95 is a superset of Fortran 77, and where a distinction is made between the two, the former is taken to imply the use of features not available in Fortran 77. Thus "translation of Fortran 77 to Fortran 95" implies the introduction of language which would not be acceptable to a strict Fortran 77 compiler.
The procedures used to install plusFORT are system dependent, and are described in a separate guide included with the installation kit.
Depending on the type of licence you have purchased, you may find that some parts of plusFORT are not available to you. If you try to use an unlicensed feature, plusFORT will inform you of the fact, and either halt, or continue with the requested functionality disabled. If you find you need to extend your licence, call your supplier for a new authorization code.
When plusFORT is installed, a set of configuration files is placed in the installation directory. These files include:
contains licensing information and your authorization code.
The default SPAG configuration file.
A SPAG configuration file for translating Fortran 77 to Fortran 90/95.
A SPAG configuration file which instructs SPAG to use Fortran 77 control constructs where possible.
contains a list of Fortran 90/95 intrinsic functions.
contains a list of Fortran 77 intrinsic functions.
contains a list of VAX Fortran intrinsic functions.
A Fortran 90 module used to translate some Fortran 77 types to Fortran 90/95.
contains GXCHK configuration data.
contains AUTOMAKE configuration data.
sample AUTOMAKE configuration data for a SPAG project.
contains QMERGE configuration data.
contains CVRANAL configuration data.
In many situations users will want to set up local copies of some or all of these files. When plusFORT looks for a configuration file, it looks in turn at the following directories, until a file with the required name is found:
Linux bash shell and Mac
Unix C shell
setenv PFDIR /opt/pf
Unix Bourne shell
PFDIR=/opt/pf; export PFDIR
You can also specify PFDIR on the command line:
spag pfdir=/harry *.f
When a plusFORT program, such as SPAG, is run, information can be passed to the program by way of command line arguments. There are two types of command line argument:
Parameter arguments. These take the form name=val where name is the parameter name. Permissible parameter names are detailed in the description of each program. val is a value to be assigned to the parameter. (e.g. FIG=TEST.FIG)
Note that there must be no spaces in the value string, or on either side of the '='. Commas are allowed within the value string on Windows systems, but not on Linux or Mac.
File name arguments. All arguments which do not contain '=' are file name arguments, and are used to specify the files to be processed. There may be any number of file name arguments. Wild cards are permitted (e.g. *.smb).
Command line arguments are separated from the program name and from each other by spaces.
gxchk *.smb fig=gxchk2.fig 309=1
On most platforms, plusFORT programs set an exit code which can be examined by the operating system after the program terminates. The codes which may be encountered are:
Nothing more serious than an informational message issued.
Nothing more serious than an warning message issued.
plusFORT found an error in the input, but was able to continue.
plusFORT found an error in the input, and was not able to continue.
Assertion failure. A serious error which could result from previously reported errors.
GXCHK allows you to specify a severity code for each of the code analysis messages it can produce (see items 401-450 of gxchk.fig in Section 3.4).