HPlogo MPE/iX Commands Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 4  Command Definition F-K

FTNXL

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

Compiles an HP FORTRAN 77/iX program. HP FORTRAN 77/iX is not part of the HP 3000 Series 900 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. (Native Mode)

Syntax

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

NOTE: This command follows the optional MPE/iX command line syntax. Refer to "Optional Format for MPE/iX Commands" at the beginning of this chapter.

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 either 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 stores the object file in a permanent file of the correct size, type, and name you specified.

If either a file of the same name or the default file $OLDPASS already exists, the new object code overwrites the old if the file code is NMOBJ or is appended to the old if the file code is NMRL. If the file code is NMRL, any existing version of the code module is first purged.

The compiler may issue an error message telling you that a new or existing object file is too small to contain the compiler's output or number of modules. In that case you must build a larger file or use the Link Editor to clean the NMRL. You may then recompile to the new file.

You may use the MPE/iX SAVE command to store $OLDPASS as a permanent file under another name.

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 string of no more than 255 characters (including the single or double quotation 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, and FTNLIST) cannot be backreferenced as actual file designators in the command parameter list. For further information, refer to the "Implicit FILE Commands for Subsystems" discussion of the FILE command.

Operation Notes

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, MPE/iX expects the source program to be entered from your standard input ($STDIN). If you do not specify listfile, MPE/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.

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

Use

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 the RESUME command continues the execution.

Examples

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 native mode uses the MPE/iX LINK command not the MPE V/E PREP command. This produces a significant change in the method of linking code.

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 Link Editor 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=NMRL
FTNXL MAIN, RLFILE
FTNXL SUB, RLFILE
LINK RLFILE,SOMEPROG
RUN SOMEPROG

Related Information

Commands

FTNXLGO, FTNXLLK, RUN, XEQ, PREP, SEGMENTER

Manuals

HP FORTRAN 77/iX Reference

MPE Segmenter Reference Manual

Feedback to webmaster