1 Introduction

1.1 Overview

plusFORT is a suite of tools for Fortran programmers. The main components are summarized below.

SPAG

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.

GXCHK

A global static analysis tool.

CVRANAL

A coverage analysis reporting tool.

QMERGE

A version selection tool.

QSPLIT

A small file-splitting utility.

AUTOMAKE

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.

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:

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:

  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:

    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
  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:

Example

      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:

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