IBSET (The GNU Fortran Compiler) (original) (raw)
Next: ICHAR — Character-to-integer conversion function, Previous: IBITS — Bit extraction, Up: Intrinsic Procedures [Contents][Index]
8.142 IBSET
— Set bit ¶
Synopsis:
RESULT = IBSET(I, POS)
Description:
IBSET
returns the value of I with the bit at positionPOS set to one.
Class:
Elemental function
Arguments:
I | The type shall be INTEGER or UNSIGNED. |
---|---|
POS | The type shall be INTEGER. |
Return value:
The return value is of the same type as I.
Specific names:
Name | Argument | Return type | Standard |
---|---|---|---|
IBSET(A) | INTEGER A | INTEGER | Fortran 90 and later |
BBSET(A) | INTEGER(1) A | INTEGER(1) | GNU extension |
IIBSET(A) | INTEGER(2) A | INTEGER(2) | GNU extension |
JIBSET(A) | INTEGER(4) A | INTEGER(4) | GNU extension |
KIBSET(A) | INTEGER(8) A | INTEGER(8) | GNU extension |
Standard:
Fortran 90 and later, has overloads that are GNU extensions. Extension for UNSIGNED
(see Unsigned integers)
See also:
IBCLR — Clear bit,
IBITS — Bit extraction,
IAND — Bitwise logical and,
IOR — Bitwise logical or,
IEOR — Bitwise logical exclusive or,
MVBITS — Move bits from one integer to another