HP Fortran Programmer's Reference (September 2007)

Intrinsic procedures
Intrinsic procedure specifications
Chapter 11 621
Result type,
type parameters,
and shape
The result is a default integer array of rank one whose size is equal to the rank of SOURCE.
Result value
The value of the result is the shape of SOURCE.
Specific forms
KSHAPE.
SIGN(A, B)
Description
Absolute value of A times the sign of B.
Class
Elemental function.
Arguments
A must be of type integer or real.
B must be of the same type and kind type parameter as A.
Result type/
type parameters
Same as A.
Result value
The value of the result is |A| if B>= 0 and –|A| if B < 0.
Specific forms
BSIGN, DSIGN, HSIGN, IISIGN, JSIGN, QSIGN, KISIGN.