]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/fortran/doc/gfortran/intrinsic-procedures/lshift.rst
sphinx: add missing trailing newline
[thirdparty/gcc.git] / gcc / fortran / doc / gfortran / intrinsic-procedures / lshift.rst
CommitLineData
c63539ff
ML
1..
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.
5
6.. _lshift:
7
8LSHIFT --- Left shift bits
9**************************
10
11.. index:: LSHIFT, bits, shift left
12
13.. function:: LSHIFT(I, SHIFT)
14
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.
20
21 :param I:
22 The type shall be ``INTEGER``.
23
24 :param SHIFT:
25 The type shall be ``INTEGER``.
26
27 :return:
28 The return value is of type ``INTEGER`` and of the same kind as
29 :samp:`{I}`.
30
31 Standard:
32 GNU extension
33
34 Class:
35 Elemental function
36
37 Syntax:
38 .. code-block:: fortran
39
40 RESULT = LSHIFT(I, SHIFT)
41
42 See also:
43 :ref:`ISHFT`,
44 :ref:`ISHFTC`,
45 :ref:`RSHIFT`,
46 :ref:`SHIFTA`,
47 :ref:`SHIFTL`,
3ed1b4ce 48 :ref:`SHIFTR`