2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
8 LSHIFT --- Left shift bits
9 **************************
11 .. index:: LSHIFT, bits, shift left
13 .. function:: LSHIFT(I, SHIFT)
15 ``LSHIFT`` returns a value corresponding to :samp:`{I}` with all of the
16 bits shifted left by :samp:`{SHIFT}` places. :samp:`{SHIFT}` shall be
17 nonnegative and less than or equal to ``BIT_SIZE(I)``, otherwise
18 the result value is undefined. Bits shifted out from the left end are
19 lost; zeros are shifted in from the opposite end.
22 The type shall be ``INTEGER``.
25 The type shall be ``INTEGER``.
28 The return value is of type ``INTEGER`` and of the same kind as
38 .. code-block:: fortran
40 RESULT = LSHIFT(I, SHIFT)