MVBITS — Move bits from one integer to another¶
- MVBITS()¶
Moves
LENbits from positionsFROMPOSthroughFROMPOS+LEN-1ofFROMto positionsTOPOSthroughTOPOS+LEN-1ofTO. The portion of argumentTOnot affected by the movement of bits is unchanged. The values ofFROMPOS+LEN-1andTOPOS+LEN-1must be less thanBIT_SIZE(FROM).- Parameters
FROM – The type shall be
INTEGER.FROMPOS – The type shall be
INTEGER.LEN – The type shall be
INTEGER.TO – The type shall be
INTEGER, of the same kind asFROM.TOPOS – The type shall be
INTEGER.
Standard:Fortran 90 and later, has overloads that are GNU extensions
Class:Elemental subroutine
Syntax:CALL MVBITS(FROM, FROMPOS, LEN, TO, TOPOS)
Specific names:Name
Argument
Return type
Standard
MVBITS(A)INTEGER AINTEGERFortran 90 and later
BMVBITS(A)INTEGER(1) AINTEGER(1)GNU extension
IMVBITS(A)INTEGER(2) AINTEGER(2)GNU extension
JMVBITS(A)INTEGER(4) AINTEGER(4)GNU extension
KMVBITS(A)INTEGER(8) AINTEGER(8)GNU extension
See also:IBCLR, IBSET, IBITS, IAND, IOR, IEOR