# MASKR

Elemental Intrinsic Function (Generic): Returns a right-justified mask.

result = MASKR (i[,kind])

i | (Input) Must be of type integer or of type logical (which is treated as an integer). It must be nonnegative and less than or equal to the number of bits s of the model integer defined for bit manipulation contexts.
kind | (Input; optional) Must be a scalar integer constant expression.

## Results

The result type is integer. If kind is present, the kind parameter of the result is that specified by kind; otherwise, the kind parameter of the result is that of default integer. If the processor cannot represent the result value in the kind of the result, the result is undefined.

The result value has its rightmost I bits set to 1 and the remaining bits set to 0.

The model for the interpretation of an integer value as a sequence of bits is in Model for Bit Data.

## Example

MASKR (3) has the value 7.

Parent topic: M to N

## See Also

MASKL