XL Fortran for AIX 8.1

Language Reference


MVBITS(FROM, FROMPOS, LEN, TO, TOPOS)

Copies a sequence of bits from one data object to another.

FROM
must be of type integer. It is an INTENT(IN) argument.

FROMPOS
must be of type integer and nonnegative. It is an INTENT(IN) argument. FROMPOS + LEN must be less than or equal to BIT_SIZE (FROM).

LEN
must be of type integer and nonnegative. It is an INTENT(IN) argument.

TO
must be a variable of type integer with the same kind type parameter value as FROM and may be the same variable as FROM. It is an INTENT(INOUT) argument. TO is set by copying the sequence of bits of length LEN, starting at position FROMPOS of FROM to position TOPOS of TO. No other bits of TO are altered. On return, the LEN bits of TO starting at TOPOS are equal to the value that the LEN bits of FROM starting at FROMPOS had on entry.

The bits are numbered 0 to BIT_SIZE(I)-1, from right to left.

TOPOS
must be of type integer and nonnegative. It is an INTENT(IN) argument. TOPOS + LEN must be less than or equal to BIT_SIZE (TO).

Class

Elemental subroutine

Examples

If TO has the initial value 6, the value of TO is 5 after the statement

CALL MVBITS (7, 2, 2, TO, 0)

See Integer Bit Model.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]