Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 3/22/2024
Public
Document Table of Contents

MASKL

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

result = MASKL (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 leftmost 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

MASKL (3) has the value SHIFTL (7, BIT_SIZE (0) - 3).

See Also