HP 3000 Manuals

Ap C. Using HP Link Editor/XL with HP FORTRAN 77/XL [ HP Link Editor/XL Reference Manual ] MPE/iX 5.0 Documentation


HP Link Editor/XL Reference Manual

Appendix C  Using HP Link Editor/XL with HP FORTRAN 77/XL 

This appendix discusses the HP FORTRAN 77/XL compiler conventions that
relate specifically to HP Link Editor/XL. The following items explain how
you use these conventions to successfully create executable program
files.  (For details about the compiler conventions shown, see the HP 
FORTRAN 77/XL Reference Manual.)

   *   Compilation units 

       If you do not use the $RLFILE compiler directive, the entire
       source file is treated as one compilation unit and the compiler
       produces a relocatable object file containing a single relocatable
       object module.

       If you use $RLFILE, each program unit (main program, subroutine,
       function, or block data subprogram) is treated as a separate
       compilation unit and results in a separate relocatable object
       module in the relocatable library.

   *   Relocatable object module name 

       If you do not use the $RLFILE compiler directive, the relocatable
       object module name is the unqualified name of the HP FORTRAN 77
       source file.

       If you use $RLFILE, the relocatable object module name is the name
       of that program unit or module.  If the program is a block data
       subprogram, you must use the BLOCKDATA parameter (not the MODULE
       parameter) to reference it when using the link editor.

   *   Program entry point 

       The program entry point is the first executable statement in the
       main program.  This name is main__ unless you enter a different
       name in the HP FORTRAN 77 program statement.

   *   Scope of variables, functions and procedures 

       Names of COMMON blocks, subroutines and functions have universal
       scope.  When compiled separately, HP FORTRAN 77 subroutines and
       functions do not generate a dummy main block.

   *   Locality sets 

       The HP FORTRAN 77 $LOCALITY compiler directive associates program
       units with a locality set.  The name of the locality set must
       begin with a letter.  It can contain up to 32 alphanumeric
       characters.  Place the $LOCALITY directive before the program
       unit(s) to be placed in a locality set (the directive remains in
       effect until the next $LOCALITY directive).

       If you do not use the $LOCALITY directive, CODE is the default
       locality set name.

   *   Type checking 

       Two compiler directives specify the level of type checking that
       the link editor uses when resolving references between HP FORTRAN
       77 subroutines and functions.  They are $CHECK_FORMAL_PARM and
       $CHECK_ACTUAL_PARM and they are described in the next two
       paragraphs.

       $CHECK_FORMAL_PARM associates a check level with the formal
       declaration of the subroutine or function.  Place
       $CHECK_FORMAL_PARM before the declaration of the subroutine or
       function (it remains in effect until a new directive is
       encountered).  If you do not use $CHECK_FORMAL_PARM, the compiler
       uses type checking level 3.

       $CHECK_ACTUAL_PARM associates a check level with each subroutine
       or function call encountered.  You can place $CHECK_ACTUAL_PARM
       anywhere in the source file.  It remains in effect until a new
       directive is encountered.  If you do not use $CHECK_ACTUAL_PARM,
       the compiler uses type checking level 3.

       To override the type checking level used during compilation, use
       the PARMCHECK option of the LINK command (see Chapter 4).



MPE/iX 5.0 Documentation