mvbits

Date:

10-12-2011

NAME

MVBITS - Copies a sequence of bits from one integer data object to another

SYNOPSIS

CALL MVBITS ([FROM=]from, [FROMPOS=]frompos, [LEN=]len, [TO=]to, [TOPOS=]topos)
INTEGER :: from ,frompos ,len ,to ,topos

IMPLEMENTATION

Cray Linux Environment (CLE)

STANDARDS

Fortran

DESCRIPTION

The MVBITS intrinsic subroutine copies a sequence of bits from one integer data object to another. It accepts the following arguments:

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. The sum frompos + len must be less than or equal to BIT_SIZE (from). The bit model defines the interpretation of an integer value as a sequence of bits. For more information on the bit model, see the models(3i) man page.

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. The to argument 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.

topos

Must be of type integer and nonnegative. It is an INTENT (IN) argument. The sum topos + len must be less than or equal to BIT_SIZE (to).

MVBITS is an elemental subroutine. The name of this intrinsic cannot be passed as an argument.

EXAMPLES

If TO has the initial value 6, the value of TO after the statement CALL MVBITS(7, 2, 2, TO, 0) is 5.

SEE ALSO

models(3i)