1 Introduction

1.1 Overview

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.


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.

1.2 Installation

The procedures used to install plusFORT are system dependent, and are described in a separate guide included with the installation kit.

1.3 Licensing

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.

1.4 Configuration Files

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:

  1. The current directory.
  2. The directory (if any) specified using the PFDIR environment variable. PFDIR would normally be set by an operating system command:


    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
  3. The installation directory (i.e. the directory containing the currently executing program).

1.5 Command line Arguments

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:


      gxchk  *.smb fig=gxchk2.fig  309=1

1.6 Exit Codes

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:


No messages.


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).