XL Fortran for AIX 8.1
Language Reference
Performs a logical shift.
- I
- must be of type integer.
- SHIFT
- must be of type integer. The absolute value of SHIFT must be less
than or equal to BIT_SIZE (I).
Class
Elemental function
Result Type and Attributes
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.
- Vacated bits are filled with zeros.
- The bits are numbered 0 to BIT_SIZE(I)-1, from right to left.
Examples
ISHFT (3, 1) has the result 6. See Integer Bit Model.
Specific Name
| Argument Type
| Result Type
| Pass As Arg?
|
ISHFT (1)
| any integer
| same as argument
| yes
|
Notes:
- IBM Extension.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]