plusFORT is a suite of tools for Fortran programmers. The main components are summarized below.
A graphical user interface which allows users to run SPAG, GXCHK, CVRANAL and HyperKWIC without using the command line. | |
The primary analysis and restructuring tool of plusFORT. SPAG processes Fortran 77 with all common extensions, and 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. | |
HyperKWIC |
A tool for generating Hypertext KeyWord In Context reports for source code in a variety of programming languages. |
In this manual we refer often to the different Fortran standards (Fortran 66, Fortran 77, Fortran 90, Fortran 95 and Fortran 2003). 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. Similarly, we sometimes use "Fortran 2003" to refer to language which is legal Fortran 2003, but not legal Fortran 95.
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:
plusFORT.fig | contains licensing information and your authorization code. |
spag.fig | The default SPAG configuration file. |
tof90.fig | A SPAG configuration file for translating Fortran 77 to Fortran 90/95. |
spag77.fig | A SPAG configuration file which instructs SPAG to use Fortran 77 control constructs where possible. |
f90func.txt | contains a list of Fortran 90/95 intrinsic functions. |
f77func.txt | contains a list of Fortran 77 intrinsic functions. |
vaxfunc.txt | contains a list of VAX Fortran intrinsic functions. |
f77kinds.f90 | A Fortran 90 module used to translate some Fortran 77 types to Fortran 90/95. |
gxchk.fig | contains GXCHK configuration data. |
automake.fig | contains AUTOMAKE configuration data. |
autospag.fig | sample AUTOMAKE configuration data for a SPAG project. |
qmerge.fig | contains QMERGE configuration data. |
cvranal.fig | 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:
Windows |
SET PFDIR=c:\plusfort |
Linux bash shell and Mac |
export PFDIR=/opt/pf |
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:
0 |
No messages. |
1 |
Nothing more serious than an informational message issued. |
2 |
Nothing more serious than an warning message issued. |
4 |
plusFORT found an error in the input, but was able to continue. |
8 |
plusFORT found an error in the input, and was not able to continue. |
16 |
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).