ishftc
- Date:
10-12-2011
NAME
ISHFTC, IISHFTC, JISHFTC, KISHFTC - Perform a circular shift of the rightmost bits
SYNOPSIS
ISHFTC ([I=]i, [SHIFT=]shift [,[SIZE=]size])
IISHFTC ([I=]i, [SHIFT=]shift [,[SIZE=]size])
JISHFTC ([I=]i, [SHIFT=]shift [,[SIZE=]size])
KISHFTC ([I=]i, [SHIFT=]shift [,[SIZE=]size])
IMPLEMENTATION
Cray Linux Environment (CLE)
STANDARDS
Fortran
Fortran extensions: IISHFTC, JISHFTC, KISHFTC
DESCRIPTION
The ISHFTC, IISHFTC, JISHFTC, and KISHFTC intrinsic functions perform a circular shift of the rightmost bits. They accept the following arguments:
- i
Must be of type integer. For IISHFTC, must be of type INTEGER(KIND=2). For JISHFTC, must be of type INTEGER(KIND=4). For KISHFTC, must be of type INTEGER(KIND=8).
- shift
Must be of type integer. The absolute value of shift must be less than or equal to size.
- size
Must be of type integer. The value of size must be positive and not exceed BIT_SIZE(i). If size is absent, the function is processes as if size were present with the value of BIT_SIZE(i).
These are elemental intrinsic functions. The names of these intrinsics cannot be passed as arguments.
RETURN VALUES
The result type and type parameter are the same as i. The result has the value obtained by shifting the size rightmost bits of i circularly 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. No bits are lost. The unshifted bits are unaltered.
The bit model defines the interpretation of an integer value as a sequence of bits. For more information on the model, see the models(3i) man page.
EXAMPLES
ISHFTC(3,2,3) yields 5.
SEE ALSO
models(3i)