The ts_colinfo_number() function

The ts_colinfo_number() function gets type information for a column in a time series.

Syntax

ts_typeinfo *
ts_colinfo_number (ts_tsdesc  *tsdesc, 
                   mi_integer id)
tsdesc
A time series descriptor returned by ts_open().
id
The column number to return information for. The id argument must be greater than or equal to 0 and less than the number of columns in a time series element. An id of 0 corresponds to the time stamp column.

Description

The resulting typeinfo structure and its ti_typename field must be freed by the caller.

Returns

A pointer to a ts_typeinfo structure. This structure is defined as follows:
typedef struct _ts_typeinfo
{
   MI_TYPEID         *ti_typeid; /* type id */
   mi_integer         ti_typelen; /* internal length */
   mi_smallint         ti_typealign; /* internal alignment */
   mi_smallint         ti_typebyvalue; /* internal byvalue flag */
   mi_integer         ti_typebound; /* internal bound */
   mi_integer         ti_typeparameter; /* internal parameter */
   mi_string          *ti_typename; /* type name of the column */
} ts_typeinfo;

Example

See the ts_interp() function, The Interp function example, for an example of ts_colinfo_number().