]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/fortran/doc/gfortran/intrinsic-procedures/not.rst
841b19c9844a5d9bb7ff743f4a6fb536efd4c60e
[thirdparty/gcc.git] / gcc / fortran / doc / gfortran / intrinsic-procedures / not.rst
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 .. _not:
7
8 .. index:: NOT
9
10 .. index:: BNOT
11
12 .. index:: INOT
13
14 .. index:: JNOT
15
16 .. index:: KNOT
17
18 .. index:: bits, negate
19
20 .. index:: bitwise logical not
21
22 .. index:: logical not, bitwise
23
24 NOT --- Logical negation
25 ************************
26
27 .. function:: NOT()
28
29 ``NOT`` returns the bitwise Boolean inverse of :samp:`{I}`.
30
31 :param I:
32 The type shall be ``INTEGER``.
33
34 :return:
35 The return type is ``INTEGER``, of the same kind as the
36 argument.
37
38 Standard:
39 Fortran 90 and later, has overloads that are GNU extensions
40
41 Class:
42 Elemental function
43
44 Syntax:
45 .. code-block:: fortran
46
47 RESULT = NOT(I)
48
49 Specific names:
50 .. list-table::
51 :header-rows: 1
52
53 * - Name
54 - Argument
55 - Return type
56 - Standard
57
58 * - ``NOT(A)``
59 - ``INTEGER A``
60 - ``INTEGER``
61 - Fortran 95 and later
62 * - ``BNOT(A)``
63 - ``INTEGER(1) A``
64 - ``INTEGER(1)``
65 - GNU extension
66 * - ``INOT(A)``
67 - ``INTEGER(2) A``
68 - ``INTEGER(2)``
69 - GNU extension
70 * - ``JNOT(A)``
71 - ``INTEGER(4) A``
72 - ``INTEGER(4)``
73 - GNU extension
74 * - ``KNOT(A)``
75 - ``INTEGER(8) A``
76 - ``INTEGER(8)``
77 - GNU extension
78
79 See also:
80 :ref:`IAND`,
81 :ref:`IEOR`,
82 :ref:`IOR`,
83 :ref:`IBITS`,
84 :ref:`IBSET`,
85 :ref:`IBCLR`