HP Fortran Programmer's Reference (September 2007)

Intrinsic procedures
Intrinsic procedure specifications
Chapter 11572
SHIFT must be of type integer. The absolute value of SHIFT must be less than or
equal to BIT_SIZE(I).
Result type/
type parameters
Same as I.
Result value
The result has the value obtained by shifting the bits of I by SHIFT positions.
If SHIFT is positive, the shift is to the left; if SHIFT is negative, the shift is to the right; and if
SHIFT is zero, no shift is performed. Bits shifted out from the left or from the right, as
appropriate, are lost. Zeros are shifted in from the opposite end.
The model for the interpretation of an integer value as a sequence of bits is described in “The
Bit Model” on page 508.
Specific forms
BSHFT, HSHFT, IISHFT, JISHFT, KISHFT.
ISHFTC(I, SHIFT, SIZE)
Optional argument
SIZE
Description
Performs a circular shift of the rightmost bits.
Class
Elemental function.
Arguments
I must be of type integer.
SHIFT must be of type integer. The absolute value of SHIFT must be less than or
equal to SIZE.