Purpose
Convert from REAL(4) to INTEGER(2).
This
procedure is a specific function, not a generic function.
Argument type and attributes
- A
- An INTENT(IN) REAL(4)
Result type and attributes
An INTEGER(2) scalar
or array.
Result value
- If |A| < 1, HFIX (A) has the value 0.
- If |A| ≥ 1, HFIX (A) is the integer whose magnitude is the
largest integer that does not exceed the magnitude of A and whose
sign is the same as the sign of A.
- The result is undefined if the result cannot be represented in
an INTEGER(2).
Examples
HFIX (-3.7)
has the value -3.
Specific Name |
Argument Type |
Result Type |
Pass As Arg? |
HFIX |
REAL(4) |
INTEGER(2) |
no |