typestr
Syntax
typestr(X)
Details
Return a string indicating the data type of X. Please refer to Data Types for details.
Parameters
X can be any data type that the system supports.
Returns
A scalar of type STRING.
Examples
x=3;
x;
// output: 3
typestr x;
// output: INT
typestr 1.2;
// output: DOUBLE
typestr `Hello;
// output: STRING
// typestr for columnar tuples
a = array(ANY[INT], 0, 10)
a.append!([1, 2, 3])
typestr(a)
// output: ANY[INT] VECTOR
b = array(ANY[DOUBLE], 0, 10)
typestr(b)
// output: ANY[DOUBLE] VECTOR
c = array(ANY[STRING], 0, 10)
typestr(c)
// output: ANY[STRING] VECTOR
d = array(ANY[DECIMAL32(2)], 0, 10)
typestr(d)
// output: ANY[DECIMAL32(2)] VECTOR
// Comparison with regular tuples
g = ([1,2,3], [4,5,6])
typestr(g)
// output: ANY VECTOR
// After converting with setColumnarTuple!
g.setColumnarTuple!()
typestr(g)
// output: ANY[INT] VECTOR
