HP 3000 Manuals

The Commands of the Command File [ HP FORTRAN 77/iX Migration Guide ] MPE/iX 5.0 Documentation


HP FORTRAN 77/iX Migration Guide

The Commands of the Command File 

The following are the commands contained in the command file
FTNCMDS.PUB.SYS. They are listed in the order they appear when the
migration aid executes.

Free Format 

If free formatting has been used in a FORTRAN 66/V program, you must
change the source file to fixed format before the migration aid can
perform any other conversions.  However, since most FORTRAN 66/V programs
are written in fixed format, this command does not usually need to be
applied.

Applying this command to a program that is already in fixed format can
produce incorrect changes.  Therefore, if you plan to convert many files
that are already in fixed format, you may want to make a copy of the file
FTNCMDS and delete the format conversion commands from the copy.  Then
use the modified command file on the program files that are in fixed
format.  This will prevent you from applying the format conversion
command incorrectly.

Directives That Are Changed 

This command first encloses include files in single quotes.  It then
makes the substitutions listed in Table 3-1 .

Some FORTRAN 66/V compiler directives have an equivalent directive
available in the HP FORTRAN 77/V compiler.  Other directives do not have
exact equivalents but may have close approximations.

The following FORTRAN 66/V directives are changed to the HP FORTRAN 77/V
directives shown:

          Table 3-1.  Conversions of Directives 

---------------------------------------------------------------------
|                                |                                  |
|          FORTRAN 66/V          |         HP FORTRAN 77/V          |
|                                |                                  |
---------------------------------------------------------------------
|                                |                                  |
| $CHECK=n                       | $CHECK_FORMAL_PARM n             |
|                                |                                  |
---------------------------------------------------------------------
|                                |                                  |
| $SEGMENT=sname                 | $SEGMENT 'sname'                 |
|                                |                                  |
---------------------------------------------------------------------
|                                |                                  |
| $LIST                          | $LIST ON                         |
|                                |                                  |
---------------------------------------------------------------------
|                                |                                  |
| $NOLIST                        | $LIST OFF                        |
|                                |                                  |
---------------------------------------------------------------------
|                                |                                  |
| $CODE                          | $LIST_CODE ON                    |
|                                |                                  |
---------------------------------------------------------------------
|                                |                                  |
| $NOCODE                        | $LIST_CODE OFF                   |
|                                |                                  |
---------------------------------------------------------------------
|                                |                                  |
| $MAP                           | $TABLES ON                       |
|                                |                                  |
---------------------------------------------------------------------
|                                |                                  |
| $NOMAP                         | $TABLES OFF                      |
|                                |                                  |
---------------------------------------------------------------------
|                                |                                  |
| $BOUNDS                        | $RANGE ON                        |
|                                |                                  |
---------------------------------------------------------------------
|                                |                                  |
| $WARN                          | $WARNINGS ON                     |
|                                |                                  |
---------------------------------------------------------------------
|                                |                                  |
| $NOWARN                        | $WARNINGS OFF                    |
|                                |                                  |
---------------------------------------------------------------------
|                                |                                  |
| $LOCATION                      | $CODE_OFFSETS ON                 |
|                                |                                  |
---------------------------------------------------------------------
|                                |                                  |
| $NOLOCATION                    | $CODE_OFFSETS OFF                |
|                                |                                  |
---------------------------------------------------------------------
|                                |                                  |
| $INIT                          | $INIT ON                         |
|                                |                                  |
---------------------------------------------------------------------

Directives That Have No Equivalent 

The following FORTRAN 66/V directives have no equivalent in HP FORTRAN
77/V. They are deleted by the migration aid.

$EDIT                       $CONTROL FIXED
$TRACE                      $CONTROL FREE
$CONTROL STAT               $CONTROL FILE=n-m 
$CONTROL NOSTAT             $CONTROL FILE=n 
$CONTROL SOURCE             $CONTROL ERRORS=n 
$CONTROL NOSOURCE           $CONTROL CROSSREF
$CONTROL LABEL              $CONTROL CROSSREF ALL
$CONTROL NOLABEL

$CONTROL is changed to $OPTION. ($CONTROL and $OPTION are
interchangeable, but the change prevents the migration aid from
reconverting the line.)  If all options on a line are deleted and only
$CONTROL remains, the line is deleted.

IF and SET Directives 

The IF and SET directives are changed as follows:

          Table 3-2.  Conversions of IF and SET Directives 

-------------------------------------------------------------
|                             |                             |
|        FORTRAN 66/V         |       HP FORTRAN 77/V       |
|                             |                             |
-------------------------------------------------------------
|                             |                             |
| $SET Xn ON                  | $SET (Xn= .TRUE.)           |
|                             |                             |
-------------------------------------------------------------
|                             |                             |
| $SET Xn OFF                 | $SET (Xn= .FALSE.)          |
|                             |                             |
-------------------------------------------------------------
|                             |                             |
| $IF Xn=ON                   | $IF (Xn)                    |
|                             |                             |
-------------------------------------------------------------
|                             |                             |
| $IF Xn=OFF                  | $IF (.NOT.Xn)               |
|                             |                             |
-------------------------------------------------------------
|                             |                             |
| $IF                         | $ENDIF                      |
|                             |                             |
-------------------------------------------------------------

Octal Constants 

Octal constants have a different notation in HP FORTRAN 77/V. Selecting Y
(yes) for this set of commands changes constants of the form %nn  (where
represents a blank), %nnJ, or %nnL to nnB. Other types, such as %nnR, are
not affected.

Character Constants 

Character constants also have a different notation in HP FORTRAN 77/V.
Selecting Y (yes) for this set of commands changes constants of the form
%nnC to CHAR(nnB) unless they are found in a FORMAT statement line, in
which case it is assumed that they represent carriage control constants.



MPE/iX 5.0 Documentation