ClassesClassesClassesClasses | | | | Operators

tuple_lshtuple_lshTupleLshtuple_lshTupleLshTupleLsh (Operator)


tuple_lshtuple_lshTupleLshtuple_lshTupleLshTupleLsh — Shift a tuple bitwise to the left.


tuple_lsh( : : T, Shift : Lsh)

Herror tuple_lsh(const Hlong T, const Hlong Shift, Hlong* Lsh)

Herror T_tuple_lsh(const Htuple T, const Htuple Shift, Htuple* Lsh)

Herror tuple_lsh(const HTuple& T, const HTuple& Shift, Hlong* Lsh)

Herror tuple_lsh(const HTuple& T, const HTuple& Shift, HTuple* Lsh)

void TupleLsh(const HTuple& T, const HTuple& Shift, HTuple* Lsh)

HTuple HTuple::TupleLsh(const HTuple& Shift) const

void HOperatorSetX.TupleLsh(
[in] VARIANT T, [in] VARIANT Shift, [out] VARIANT* Lsh)

VARIANT HTupleX.TupleLsh(
[in] VARIANT T, [in] VARIANT Shift)

static void HOperatorSet.TupleLsh(HTuple t, HTuple shift, out HTuple lsh)

HTuple HTuple.TupleLsh(HTuple shift)


tuple_lshtuple_lshTupleLshtuple_lshTupleLshTupleLsh shifts the tuple TTTTTt bitwise to the left by ShiftShiftShiftShiftShiftshift places. If no overflow occurs, this operation is equivalent to a multiplication by 2^{ShiftShiftShiftShiftShiftshift}. If TTTTTt is negative, the result depends on the hardware. If ShiftShiftShiftShiftShiftshift is negative or larger than 32, the result is undefined. If both tuples have the same length the corresponding elements of both tuples are shifted. Otherwise, either TTTTTt or ShiftShiftShiftShiftShiftshift must have length 1. In this case, the operation is performed for each element of the longer tuple with the single element of the other tuple. The input tuples must contain only integer numbers.

Exception: Empty input tuples

If either or both of the input tuples are empty, the operator returns an empty tuple.

HDevelop In-line Operation

HDevelop provides an in-line operation for tuple_lshtuple_lshTupleLshtuple_lshTupleLshTupleLsh, which can be used in an expression in the following syntax:

Lsh := lsh(T, Shift)



TTTTTt (input_control)  integer(-array) HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Input tuple.

ShiftShiftShiftShiftShiftshift (input_control)  integer(-array) HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Number of places to shift the input tuple.

LshLshLshLshLshlsh (output_control)  integer(-array) HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Shifted input tuple.



See also




ClassesClassesClassesClasses | | | | Operators