isha(3I)
ISHA, IISHA, JISHA, KISHA - Performs arithmetic shift on an integer
As shipped in IRIX 6.5.7. Added in IRIX 6.5.5.
NAME ISHA, IISHA, JISHA, KISHA - Performs arithmetic shift on an integer SYNOPSIS ISHA ([I=]i, [SHIFT=]shift) IISHA ([I=]i, [SHIFT=]shift) JISHA ([I=]i, [SHIFT=]shift) KISHA ([I=]i, [SHIFT=]shift) IMPLEMENTATION UNICOS, UNICOS/mk, IRIX systems CF90, MIPSpro 7 Fortran 90, MIPSpro Fortran 77 STANDARDS Fortran extensions DESCRIPTION The ISHA, IISHA, JISHA, KISHA intrinsic functions perform an arithmetic shift of an integer, left or right, by a specified number of bits. This function accepts the following arguments: i Must be of type integer. For IISHA, must be of type integer (KIND=2). For JISHA, must be of type integer (KIND=4). For KISHA, must be of type integer (KIND=8). This is the value to be shifted. shift Must be of the same type and kind type parameter as a. This is the direction and distance of the shift. Positive shifts are left, toward the most significant bit. Negative shifts are right, toward the least significant bit. If shift is zero, no shift is performed. These 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 is equal to i shifted arithmetically by shift bits. Bits shifted out, from the left or from the right, are lost. Zeros are shifted in for a left shift. The sign bit is extended for a right shift. The kind of the integer is important because the sign varies among integer representations. If you want to shift a 1-byte or 2-byte argument, declare it as KIND=1 or KIND=2. SEE ALSO Intrinsic Procedures Reference Manual for the printed version of this man page.