tuple_select_rangeTupleSelectRangeTupleSelectRangetuple_select_rangetuple_select_range
説明
tuple_select_rangeTupleSelectRangeTupleSelectRangetuple_select_rangetuple_select_range — tuple 指定した範囲にある要素を選択する。
書式
tuple_select_range( tuple Tuple, integer Leftindex, integer Rightindex, out tuple Selected )void TupleSelectRange( const HTuple& Tuple, const HTuple& Leftindex, const HTuple& Rightindex, HTuple* Selected )static void HOperatorSet.TupleSelectRange( HTuple tuple, HTuple leftindex, HTuple rightindex, out HTuple selected )def tuple_select_range( tuple: MaybeSequence[Union[float, int, str]], leftindex: MaybeSequence[int], rightindex: MaybeSequence[int] ) -> Sequence[Union[float, int, str]]
def tuple_select_range_s( tuple: MaybeSequence[Union[float, int, str]], leftindex: MaybeSequence[int], rightindex: MaybeSequence[int] ) -> Union[float, int, str]Herror tuple_select_range( const Hlong Tuple, const Hlong Leftindex, const Hlong Rightindex, Hlong* Selected )
Herror T_tuple_select_range( const Htuple Tuple, const Htuple Leftindex, const Htuple Rightindex, Htuple* Selected )
HTuple HTuple::TupleSelectRange( const HTuple& Leftindex, const HTuple& Rightindex ) const
HTuple HTuple.TupleSelectRange( HTuple leftindex, HTuple rightindex )
説明
tuple_select_rangeTupleSelectRange は入力 tuple Tupletupletuple の幾つかの
連続した要素を選択し、それらを Selectedselectedselected に返します。
Leftindexleftindexleftindex は選択するための最初の要素のインデックスを、
Rightindexrightindexrightindex は最後の要素のインデックスを決定します。
従って、両方のパラメーター Leftindexleftindexleftindex と
Rightindexrightindexrightindex は 1 つの整数値を含むことがあります(いかなる
浮動小数点数も端数なしの整数値でなければいけません)。tuple
要素のインデックスは 0 から始まります。つまり、最初の tuple 要素は
インデックス 0 です。
結果 tuple Selectedselectedselected は Leftindexleftindexleftindex と
Rightindexrightindexrightindex 間(位置 Leftindexleftindexleftindex と
Rightindexrightindexrightindex の要素を含む)のインデックスをもつ tuple
Tupletupletuple からの各要素を含みます。インデックスが等しい場合、
1 つの要素のみが選択されます。
さらに、右インデックスが Leftindexleftindexleftindex - 1 である可能性があり
ます。
この場合、左または右のインデックスが有効な場合、空 tuple が返され
ます。従って、インデックス Rightindexrightindexrightindex は大きいかまたは
Leftindexleftindexleftindex - 1 と等しくなければなりません。
例外: 入力tuple が 空
Leftindexleftindexleftindex と Rightindexrightindexrightindex が空のtupleの場合、
この関数は空のtupleを返します。
もしこれらのパラメータの一つだけが空のtupleであるか、または
Tupletupletupleが空のtupleの場合、例外が発生します。
HDevelopインライン演算
HDevelopは tuple_select_rangeTupleSelectRange の代わりとなるインライン演算を備えており、以下の構文形式で
使用することができます::
Selected := Tuple[Leftindex:Rightindex]
実行情報
実行情報
パラメーター
Tupletupletuple (input_control) tuple(-array) → (integer / real / string)HTuple (Hlong / double / HString)HTuple (int / long / double / string)MaybeSequence[Union[float, int, str]]Htuple (Hlong / double / char*)
入力 tuple
Leftindexleftindexleftindex (input_control) integer(-array) → (integer)HTuple (Hlong)HTuple (int / long)MaybeSequence[int]Htuple (Hlong)
選択する最初のインデックス
Rightindexrightindexrightindex (input_control) integer(-array) → (integer)HTuple (Hlong)HTuple (int / long)MaybeSequence[int]Htuple (Hlong)
選択する最後のインデックス
Selectedselectedselected (output_control) tuple(-array) → (integer / real / string)HTuple (Hlong / double / HString)HTuple (int / long / double / string)Sequence[Union[float, int, str]]Htuple (Hlong / double / char*)
選択された tuple 要素
他のオペレーターとの組み合わせ
組み合わせ
他の選択候補
tuple_selectTupleSelect, tuple_first_nTupleFirstN, tuple_last_nTupleLastN, tuple_select_maskTupleSelectMask, tuple_str_bit_selectTupleStrBitSelect, tuple_concatTupleConcat, tuple_select_rankTupleSelectRank
関連項目
tuple_removeTupleRemove
モジュール
Foundation