tuple_is_stringtuple_is_stringTupleIsStringTupleIsStringtuple_is_string (Operator)

Name

tuple_is_stringtuple_is_stringTupleIsStringTupleIsStringtuple_is_string — Test if the internal representation of a tuple is of type string.

Signature

tuple_is_string( : : T : IsString)

Herror tuple_is_string(const char* T, Hlong* IsString)

Herror T_tuple_is_string(const Htuple T, Htuple* IsString)

void TupleIsString(const HTuple& T, HTuple* IsString)

HTuple HTuple::TupleIsString() const

static void HOperatorSet.TupleIsString(HTuple t, out HTuple isString)

HTuple HTuple.TupleIsString()

def tuple_is_string(t: HTupleType) -> int

Description

tuple_is_stringtuple_is_stringTupleIsStringTupleIsStringTupleIsStringtuple_is_string tests if the internal representation of the input tuple TTTTtt is of type string. In that case the value 1 (true) is returned in IsStringIsStringIsStringIsStringisStringis_string, otherwise the value 0 (false) is returned. If a tuple consists of string elements only, IsStringIsStringIsStringIsStringisStringis_string can nevertheless be 0 in case the internal representation is H_TYPE_MIXED; see tuple_typetuple_typeTupleTypeTupleTypeTupleTypetuple_type for details.

Exception: Empty input tuple

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

HDevelop In-line Operation

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

IsString := is_string(T)

Attention

Even if all tuple elements are of type string, tuple_is_stringtuple_is_stringTupleIsStringTupleIsStringTupleIsStringtuple_is_string returns 0 (false) if the internal representation of the tuple is of type H_TYPE_MIXED. To test if the elements of the tuple are of type string the operator tuple_is_string_elemtuple_is_string_elemTupleIsStringElemTupleIsStringElemTupleIsStringElemtuple_is_string_elem should be used.

Execution Information

Parameters

TTTTtt (input_control)  tuple(-array) HTupleHTupleTypeHTupleHtuple (string / real / integer / handle) (string / double / int / long / HHandle) (HString / double / Hlong / HHandle) (char* / double / Hlong / handle)

Input tuple.

IsStringIsStringIsStringIsStringisStringis_string (output_control)  number HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Is the input tuple of type string?

Example (HDevelop)

tuple_is_string ([3.1416,'pi',3], IsStringA)
* IsStringA = false
tuple_is_string (['a','b','111'], IsStringB)
* IsStringB = true
tuple_is_string ([], IsStringC)
* IsStringC = true

Result

If the parameters are valid, the operator tuple_is_stringtuple_is_stringTupleIsStringTupleIsStringTupleIsStringtuple_is_string returns the value TRUE.

Alternatives

tuple_typetuple_typeTupleTypeTupleTypeTupleTypetuple_type, tuple_is_numbertuple_is_numberTupleIsNumberTupleIsNumberTupleIsNumbertuple_is_number, tuple_is_string_elemtuple_is_string_elemTupleIsStringElemTupleIsStringElemTupleIsStringElemtuple_is_string_elem

See also

tuple_is_inttuple_is_intTupleIsIntTupleIsIntTupleIsInttuple_is_int, tuple_is_realtuple_is_realTupleIsRealTupleIsRealTupleIsRealtuple_is_real, tuple_is_handletuple_is_handleTupleIsHandleTupleIsHandleTupleIsHandletuple_is_handle

Module

Foundation