The principal job of FORCONV is to convert the file name specification in Fortran include statements but it will also do some other routine tasks that are necessary when converting a program from VMS to UNIX.
dat_par
and par_par
after every occurrence of the include
file sae_par
. This compensates for an incompatibility between sae_par
on VMS and on
UNIX.
The substitution of include file names is driven by a “substitution file” which lists the VMS file specifications and their equivalent UNIX file names, one pair per line. For example the file might contain:
and an example of the source code to be converted might be:
which, after processing, would be changed to:
The case of the VMS file specification is ignored when trying to find a match and spaces are ignored in the file specification in the INCLUDE statement.
If a match for an include file specification is not found then the name is folded to lower case and a
prefix prepended; the default prefix is /star/include/
but this can be changed with the -p
command
line option. So in the above example:
would be converted to:
As a result of this, when converting programs that use Starlink libraries, the substitution file need only
specify any “program-specific” include files; references to Starlink include files will all be converted
automatically. If the program does not use Starlink libraries, then the prefix can be suppressed entirely
by specifying the -p
option with an empty string.
The program will not recognise INCLUDE statements that are continued on to a new line.
The command:
Will read from the standard input stream and write to the standard output stream, and will use
include.sub
as the name of the substitution file. The program’s behaviour can be modified with the
following UNIX-style command options:
-i
filename i
and the file name in this or any other command options.
-o
filename -s
filename -m
filename makefile
will be
written.
-b
name -b
the name module
is used.
-p
prefix /star/include/
; -p
on its
own specifies no prefix.
-h
after every occurrence of ’/star/include/sae_par’
. This compensates for an incompatibility
between the standard Starlink include file sae_par
on VMS and on UNIX and is required if the
program being converted uses any DAT__
constants.
-j
after every occurrence of ’/star/include/sae_par’
. This compensates for an incompatibility
between the standard Starlink include file sae_par
on VMS and on UNIX and is required if the
program being converted uses any PAR__
constants.
-q