HP 3000 Manuals

Running the Compiler [ HP FORTRAN 77/iX Reference ] MPE/iX 5.0 Documentation


HP FORTRAN 77/iX Reference

Running the Compiler 

The FORTRAN 77 compiler is a program file named FTNCOMP in the PUB group
of the SYS account.  To execute FTNCOMP, use the MPE/iX command RUN or
simply enter the file name.

The default source, object file, and listing files for the compiler are
$STDIN, $NEWPASS, and $STDLIST, respectively.  To override these default
values, you must:

   1.  Equate the nondefault file with its formal designator using an
       MPE/iX FILE command.

   2.  Select an appropriate value for the PARM parameter of the RUN
       command.  This value indicates which files are not defaulted.

The FORTRAN 77 compiler recognizes the formal file designators listed in
Table 6-1 .

          Table 6-1.  Formal File Designators 

-----------------------------------------------
|                      |                      |
|  Formal Designator   |         File         |
|                      |                      |
-----------------------------------------------
|                      |                      |
| FTNTEXT              | Source file          |
|                      |                      |
-----------------------------------------------
|                      |                      |
| FTNOBJ               | Object file          |
|                      |                      |
-----------------------------------------------
|                      |                      |
| FTNLIST              | Listing file         |
|                      |                      |
-----------------------------------------------

The PARM parameter of the RUN command indicates which files have appeared
in the file equations.  The compiler opens these files instead of the
default files.  For the FORTRAN 77 compiler, the PARM parameter accepts
an integer value in the range 0 to 7, as shown in Table 6-2 .

          Table 6-2.  Values for the PARM Parameter 

-----------------------------------------------
|          |                                  |
|  Value   |    Files Present in the FILE     |
|          |             Command              |
|          |                                  |
-----------------------------------------------
|          |                                  |
|    0     | None                             |
|          |                                  |
-----------------------------------------------
|          |                                  |
|    1     | Source                           |
|          |                                  |
-----------------------------------------------
|          |                                  |
|    2     | Listing                          |
|          |                                  |
-----------------------------------------------
|          |                                  |
|    3     | Listing, source                  |
|          |                                  |
-----------------------------------------------
|          |                                  |
|    4     | Object                           |
|          |                                  |
-----------------------------------------------
|          |                                  |
|    5     | Object, source                   |
|          |                                  |
-----------------------------------------------
|          |                                  |
|    6     | Object, listing                  |
|          |                                  |
-----------------------------------------------
|          |                                  |
|    7     | Object, listing, source          |
|          |                                  |
-----------------------------------------------

The low order three bits of the PARM field represent these three files:

----------------------------------
|          |          |          |
| Bit 29   | Bit 30   | Bit 31   |
|          |          |          |
----------------------------------
|          |          |          |
| object   | listing  | source   |
|          |          |          |
----------------------------------

If the PARM parameter sets a bit for the text file and no FTNTEXT file
equation exists, an attempt is made to use a permanent file named
FTNTEXT. If the permanent file FTNTEXT does not exist, an error is
generated.

If the PARM parameter sets a bit for either the listing file or the
object file and no file equation exists for FTNLIST or FTNOBJ, the
compiler creates a permanent file with the name FTNLIST or FTNOBJ to
which the appropriate output is directed.  On the other hand, if a file
equation exists and the bit is not set in the PARM value, the compiler
uses the default file.

Setting PARM to 0 is equivalent to the FTNXL command with no parameters.

The RUN command also has an optional INFO parameter.  FORTRAN 77 places a
dollar sign ($) in front of the text field and places the string before
the first line of source code in the text file.  Thus, as with the FTNXL,
FTNXLLK, and FTNXLGO commands, you can use the INFO parameter of the RUN
command to specify initial compiler directives.

Example 

     :FILE FTNTEXT=SOURCEX
     :FILE FTNOBJ=SOURCEO
     :RUN FTNCOMP.PUB.SYS; PARM=5; INFO="TABLES"

The commands above runs the compiler (FTNCOMP.PUB.SYS), reads the source
from SOURCEX, and outputs the object file into SOURCEO. By default, the
listing is output to the terminal (STDLIST) and the TABLES directive is
placed before the first line of source.



MPE/iX 5.0 Documentation