Purpose
Copies a sequence of bits from
one data object to another.
Class
Elemental subroutine
Argument type and attributes
- FROM
- An INTENT(IN) INTEGER
- FROMPOS
- An INTENT(IN) INTEGER. Its value
must be nonnegative. FROMPOS + LEN must be less than or equal to BIT_SIZE
(FROM).
- LEN
- An INTENT(IN) INTEGER. Its value
must be nonnegative.
- TO
- An INTENT(INOUT) INTEGER variable with
the same kind type parameter value as FROM and may be the same variable
as FROM. 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
- An INTENT(IN) INTEGER. Its value
must be nonnegative. TOPOS + LEN must be less than or equal to BIT_SIZE
(TO).
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.