MVBITS — Move bits from one integer to another#
-
MVBITS(FROM, FROMPOS, LEN, TO, TOPOS)#
Moves
LEN
bits from positionsFROMPOS
throughFROMPOS+LEN-1
ofFROM
to positionsTOPOS
throughTOPOS+LEN-1
ofTO
. The portion of argumentTO
not affected by the movement of bits is unchanged. The values ofFROMPOS+LEN-1
andTOPOS+LEN-1
must 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 A
INTEGER
Fortran 90 and later
BMVBITS(A)
INTEGER(1) A
INTEGER(1)
GNU extension
IMVBITS(A)
INTEGER(2) A
INTEGER(2)
GNU extension
JMVBITS(A)
INTEGER(4) A
INTEGER(4)
GNU extension
KMVBITS(A)
INTEGER(8) A
INTEGER(8)
GNU extension
- See also: