Using the Same Source Code [ HP FORTRAN 77/iX Migration Guide ] MPE/iX 5.0 Documentation
HP FORTRAN 77/iX Migration Guide
Using the Same Source Code
If you wish to compile the same source code using both the HP FORTRAN
77/V and HP FORTRAN 77/iX compilers, you can use the IF directive to
specify conditional compilation. This will switch the declarations of
items that significantly affect performance.
Example
$SET (MPE_IX = .TRUE., MPE_V = .FALSE.)
$IF (MPE_IX)
INTEGER*4 i,j,k
LOGICAL*4 tested
$ENDIF
$IF (MPE_V)
$SHORT
INTEGER*2 i,j,k
LOGICAL*2 tested
$ENDIF
SEGMENT directives can be left in the source code as synonyms for the
LOCALITY directive of HP FORTRAN 77/iX. See "LOCALITY Directive" in
Chapter 8 for further information.
MPE/iX 5.0 Documentation