tuple_lengthtuple_lengthTupleLengthTupleLengthtuple_length (算子)

名称

tuple_lengthtuple_lengthTupleLengthTupleLengthtuple_length — 返回元组的元素数量。

签名

tuple_length( : : Tuple : Length)

Herror tuple_length(const Hlong Tuple, Hlong* Length)

Herror T_tuple_length(const Htuple Tuple, Htuple* Length)

void TupleLength(const HTuple& Tuple, HTuple* Length)

HTuple HTuple::TupleLength() const

static void HOperatorSet.TupleLength(HTuple tuple, out HTuple length)

HTuple HTuple.TupleLength()

def tuple_length(tuple: MaybeSequence[Union[float, int, str]]) -> int

描述

tuple_lengthtuple_lengthTupleLengthTupleLengthTupleLengthtuple_length returns the number of elements of the input tuple TupleTupleTupleTupletupletuple.

例外:空输入元组

If the input tuple is empty, the operator returns 0.

HDevelop 内联操作

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

Length := |Tuple|

执行信息

参数

TupleTupleTupleTupletupletuple (输入控制)  tuple(-array) HTupleMaybeSequence[Union[float, int, str]]HTupleHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*)

Input tuple.

LengthLengthLengthLengthlengthlength (输出控制)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Number of elements of input tuple.

替代

tuple_mintuple_minTupleMinTupleMinTupleMintuple_min, tuple_maxtuple_maxTupleMaxTupleMaxTupleMaxtuple_max, tuple_meantuple_meanTupleMeanTupleMeanTupleMeantuple_mean, tuple_deviationtuple_deviationTupleDeviationTupleDeviationTupleDeviationtuple_deviation, tuple_sumtuple_sumTupleSumTupleSumTupleSumtuple_sum, tuple_mediantuple_medianTupleMedianTupleMedianTupleMediantuple_median

另见

tuple_typetuple_typeTupleTypeTupleTypeTupleTypetuple_type

模块

基础