The ts_get_col_by_number() function
The ts_get_col_by_number() function pulls the individual pieces of data from an element. The column 0 (zero) is always the time stamp.
Syntax
MI_DATUM
ts_get_col_by_number(ts_tsdesc *tsdesc,
ts_tselem tselem,
mi_integer colnumber,
mi_boolean *isNull,
mi_integer off)
- tsdesc
- A pointer returned by ts_open().
- tselem
- An element to get column data from.
- colnumber
- The column number. Column numbers start at 0, which represents the time stamp.
- isNull
- A pointer to a null indicator.
- off
- For a regular time series, off is the offset of the element in the time series. For an irregular time series, off is ignored.
Returns
The data in the specified column.
If the type of the column is by reference, a pointer is returned.
If the type is by value, the data itself is returned. The caller cannot
free this value. On return, isNull is set to indicate whether
the column is NULL
.
Example
See the ts_interp() function, The Interp function example, for an example of ts_get_col_by_number().