HP 3000 Manuals

Passing Character Variables [ HP FORTRAN 77/iX Migration Guide ] MPE/iX 5.0 Documentation


HP FORTRAN 77/iX Migration Guide

Passing Character Variables 

When HP FORTRAN 77/V passes character variables to subroutines, two
parameters (or two words) are actually passed.  The first parameter is a
pointer to the beginning of the character data; the second parameter is
the length of the character data.  This second parameter must be taken
into account when passing character data from an HP FORTRAN 77/V
subroutine to a FORTRAN 66/V subroutine.  To accommodate the parameter,
do one of the following:

   *   Include the $FTN3000_66 CHARS directive in the HP FORTRAN 77/V
       subroutine.

   *   Include the $ALIAS directive in the HP FORTRAN 77/V subroutine.

To pass a character variable from a FORTRAN 66/V subroutine to an HP
FORTRAN 77/V subroutine, do one of the following:

   *   Include the $FTN3000_66 CHARS directive in the HP FORTRAN 77/V
       subroutine and then recompile.

   *   Change the parameter list in the FORTRAN 66/V subroutine to
       include a dummy length parameter (which is passed by value).



MPE/iX 5.0 Documentation