FTNXL



FTNXL

     Compiles an HP FORTRAN 77/iX program.  HP FORTRAN 77/iX is
not part of the 900 Series HP 3000 Computer System
Fundamental Operating Software and must be purchased
separately. This command is recognized only if HP FORTRAN
77/iX is installed on your system.

SYNTAX

     FTNXL [textfile][,[objectfile][,listfile]]
[;INFO=quotedstring]

PARAMETERS

textfile            Actual file designator of the input file from which
the source program is read. This can be any ASCII
input file. Formal file designator is FTNTEXT.
Default is $STDIN.

objectfile Actual file designator of the object file, which is
the output of the compiler. This file is stored in
binary form and has a file code of NMOBJ (1461) or
NMRL (1033). Its formal file designator is FTNOBJ.
If the objectfile parameter is omitted, the object
code is saved to the temporary file $OLDPASS, if it
exists, or to $NEWPASS, which then becomes $OLDPASS.

If you specify objectfile, the compiler will store
the object file in a permanent file of the correct
size and type, and with the name you specified.

If a file of the same name or the default file
$OLDPASS already exist, the object code will
overwrite that file if the file code is NMOBJ, or
appends it to the old file if the file code is NMRL
If the file code is NMRL, any existing version of
the code module is first purged. If the compiler
issues an error message telling you that a new or
existing object file you are trying to compile to is
too small, you will have to build the object file
with a larger size and recompile to it. You may use
the MPE/iX SAVE command to store $OLDPASS as a
permanent file under another name.

Refer to the HP FORTRAN 77/iX Reference Manual
(31501-90002) for information on the RLINIT and
RLFILE directives that cause creation of an NMRL by
default or by initialization.

listfile Actual file designator of the file to which the
program listing is written. This can be any ASCII
output file. Formal file designator is FTNLIST.
Default is $STDLIST.

quotedstring A parameter for the compiler. It is a
quoted string of no more than 255 characters
(including the single or double quote marks that
enclose it).

The info string used in the HP FORTRAN 77/iX
programming language to pass initial compiler
options to the HP FORTRAN 77/iX compiler. HP
FORTRAN 77/iX places a single dollar sign ($) before
the info string and places the string before the
first line of source code in the text file.

NOTE

The formal file designators used in this command (FTNTEXT, FTNOBJ,
FTNLIST) cannot be backreferenced as actual file designators in the
command parameter list.

OPERATION

     The FTNXL command compiles an HP FORTRAN 77/iX program and stores
the object code in a source file on disk. If textfile is not
specified, FORTRAN 77/iX expects the source program to be entered
from your standard input ($STDIN). If you do not specify listfile,
FORTRAN 77/iX sends the listing to your standard list device
($STDLIST) and identifies it by the formal file designator,
FTNLIST. If you omit the objectfile parameter, the object code is
saved in the file domain as $OLDPASS. To keep it as a permanent
file, you save $OLDPASS under another name.

This command may be issued from a session, job, or program. It may
not be used in BREAK. Pressing [Break] suspends the execution of
this command. Entering RESUME continues the execution.

NOTE

This command is implemented as a command file. If you set the HPPATH
variable to null (SETVAR HPPATH ""), the command file will not be
executed, and the command will fail.

EXAMPLE(S)

     The following example compiles an HP FORTRAN 77/iX program
entered from your standard input device and stores the
object program in the object file $OLDPASS. The listing is
then sent to your standard list device.

FTNXL

The next example compiles an HP FORTRAN 77/iX program
contained in the disk file FORTSRC, and stores the object
program in the object file FORTOBJ. The program listing is
stored in the disk file LISTFILE.

FTNXL FORTSRC,FORTOBJ,LISTFILE

NOTE

Program development in the Native Mode of MPE/iX uses the new LINK
command in place of the MPE V/E PREP command. This produces a significant
change in the method of linking code that you must take into account.

If you have created a program called MAIN and a subprogram
called SUB, each contained in a separate file, you might
choose to handle it this way in MPE V/E

FTN MAIN, SOMEUSL
FTN SUB, SOMEUSL

PREP SOMEUSL, SOMEPROG

RUN SOMEPROG

The second command appends the code from SUB to SOMEUSL.

However, LINK (in MPE/iX Native Mode) does not append SUB.
On MPE/iX, you must compile the source files into separate
object files and then use the LinkEditor to link the two
object files into the program file, as in this example

FTNXL MAIN, OBJMAIN
FTNXL SUB, OBJSUB

LINK from=objmain,objsub;to=someprog

RUN SOMEPROG

On the other hand, if an NMRL is used instead of an NMOBJ, the
above can be simplified to the following:

BUILD RLFILE;DISC=10000;CODE=NMLR
FTNXL MAIN, RLFILE
FTNXL SUB, RLFILE
LINK RLFILE,SOMEPROG
RUN SOMEPROG

ADDITIONAL INFORMATION

Commands:   FTNXLGO, FTNXLLK

Manuals :   HP FORTRAN 77/iX Reference (31501-90010)