ClassesClassesClassesClasses | | | | Operators

tuple_rshtuple_rshTupleRshtuple_rshTupleRshTupleRsh (Operator)


tuple_rshtuple_rshTupleRshtuple_rshTupleRshTupleRsh — Shift a tuple bitwise to the right.


tuple_rsh( : : T, Shift : Rsh)

Herror tuple_rsh(const Hlong T, const Hlong Shift, Hlong* Rsh)

Herror T_tuple_rsh(const Htuple T, const Htuple Shift, Htuple* Rsh)

Herror tuple_rsh(const HTuple& T, const HTuple& Shift, Hlong* Rsh)

Herror tuple_rsh(const HTuple& T, const HTuple& Shift, HTuple* Rsh)

void TupleRsh(const HTuple& T, const HTuple& Shift, HTuple* Rsh)

HTuple HTuple::TupleRsh(const HTuple& Shift) const

void HOperatorSetX.TupleRsh(
[in] VARIANT T, [in] VARIANT Shift, [out] VARIANT* Rsh)

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

static void HOperatorSet.TupleRsh(HTuple t, HTuple shift, out HTuple rsh)

HTuple HTuple.TupleRsh(HTuple shift)


tuple_rshtuple_rshTupleRshtuple_rshTupleRshTupleRsh shifts the tuple TTTTTt bitwise to the right by ShiftShiftShiftShiftShiftshift places. This operation is equivalent to a division 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 tuple

If any of the input tuples is empty, the operator returns an empty tuple.

HDevelop In-line Operation

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

Rsh := rsh(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.

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

Shifted input tuple.



See also




ClassesClassesClassesClasses | | | | Operators