Word Length of Passed Integerand Logical Parameters [ HP FORTRAN 77/iX Migration Guide ] MPE/iX 5.0 Documentation
HP FORTRAN 77/iX Migration Guide
Word Length of Passed Integerand Logical Parameters
When calling subprograms that pass integer and logical parameters by
reference, make sure that the actual and formal parameters have the same
word length. (They should both be single integer or double integer.)
This is especially important when calling subprograms in other languages.
If parameters passed by reference are not the same, the Segmenter issues
an error message. When parameters passed by value do not have the same
word length, the HP FORTRAN 77/V compiler internally converts single
integers to double.
Logical Variables
The implementation of logicals is very different in FORTRAN 66/V and HP
FORTRAN 77/V. In FORTRAN 66/V, the binary representation of a LOGICAL*2
variable that evaluates to true is
0000000000000001 (the least significant bit)
In HP FORTRAN 77/V the variable is represented as
0000000100000000 (the least significant bit in the high-order
byte)
These are some other differences:
* When testing for the value true, HP FORTRAN 77/V checks only the
low-order bit of the high-order byte.
* When making assignments to logical variables, HP FORTRAN 77/V
manipulates only the high-order byte.
* HP FORTRAN 77/V allows bit manipulation only on integer variables,
not on logicals.
* HP FORTRAN 77/V does not support assignments of octal constants to
logical variables.
MPE/iX 5.0 Documentation