]>
Commit | Line | Data |
---|---|---|
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 | .. _ibset: | |
7 | ||
8 | .. index:: IBSET | |
9 | ||
10 | .. index:: BBSET | |
11 | ||
12 | .. index:: IIBSET | |
13 | ||
14 | .. index:: JIBSET | |
15 | ||
16 | .. index:: KIBSET | |
17 | ||
18 | .. index:: bits, set | |
19 | ||
20 | IBSET --- Set bit | |
21 | ***************** | |
22 | ||
23 | .. function:: IBSET() | |
24 | ||
25 | ``IBSET`` returns the value of :samp:`{I}` with the bit at position | |
26 | :samp:`{POS}` set to one. | |
27 | ||
28 | :param I: | |
29 | The type shall be ``INTEGER``. | |
30 | ||
31 | :param POS: | |
32 | The type shall be ``INTEGER``. | |
33 | ||
34 | :return: | |
35 | The return value is of type ``INTEGER`` and of the same kind as | |
36 | :samp:`{I}`. | |
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 = IBSET(I, POS) | |
48 | ||
49 | Specific names: | |
50 | .. list-table:: | |
51 | :header-rows: 1 | |
52 | ||
53 | * - Name | |
54 | - Argument | |
55 | - Return type | |
56 | - Standard | |
57 | ||
58 | * - ``IBSET(A)`` | |
59 | - ``INTEGER A`` | |
60 | - ``INTEGER`` | |
61 | - Fortran 90 and later | |
62 | * - ``BBSET(A)`` | |
63 | - ``INTEGER(1) A`` | |
64 | - ``INTEGER(1)`` | |
65 | - GNU extension | |
66 | * - ``IIBSET(A)`` | |
67 | - ``INTEGER(2) A`` | |
68 | - ``INTEGER(2)`` | |
69 | - GNU extension | |
70 | * - ``JIBSET(A)`` | |
71 | - ``INTEGER(4) A`` | |
72 | - ``INTEGER(4)`` | |
73 | - GNU extension | |
74 | * - ``KIBSET(A)`` | |
75 | - ``INTEGER(8) A`` | |
76 | - ``INTEGER(8)`` | |
77 | - GNU extension | |
78 | ||
79 | See also: | |
80 | :ref:`IBCLR`, | |
81 | :ref:`IBITS`, | |
82 | :ref:`IAND`, | |
83 | :ref:`IOR`, | |
84 | :ref:`IEOR`, | |
3ed1b4ce | 85 | :ref:`MVBITS` |