Previous Topic Next topic Print topic


C$LogicalShiftLeft

Performs a logical shift left operation on a non-numeric or numeric operand.

When calling this routine, ensure you are using the 1024 calling convention.

Syntax:

CALL "C$LogicalShiftLeft"
[GIVING result]
 USING operand [shiftcount]

Parameters:

result
PIC 9(n)
operand
A non-numeric or numeric operand
shiftcount
PIC 9(n)

On Entry:

operand
A non-numeric or numeric operand.
shiftcount
The number of positions to shift during the operation.

On Exit:

result
The result of the operation.

Comments:

If operand refers to a non-numeric data item, the value of the data item is shifted left by the number of bit positions specified by shiftcount. Any bits shifted off the left end are lost and zero-valued bits are shifted into the right end. The value of result is set to a non-zero value if any character of operand is non-zero after the operation completes and zero otherwise.

If operand refers to a numeric data item, the operand is converted, if necessary, to a 32-bit binary integer. The 32-bit binary value is logically shifted left by the number of bit positions specified by shiftcount. If the GIVING phrase is specified, the result of this operation is stored in result and the value of operand is not modified. If the GIVING phrase is not specified, the result of this operation is stored in operand.

Previous Topic Next topic Print topic