mcTBins, mcTBinsK, mcTBinsI, mcTBinsJ, mcTBinsE, mcTBinsC, mcTBinsF, mcTBinsZ — Insert data in relational table
#include <memcom.h> int mcTBins(const char* key, const char* type, void* data, int nelem, mcRTable* rt); int mcTBinsK(const char* key, char* data, mcRTable* rt); int mcTBinsI(const char* key, mcInt32* data, int nelem, mcRTable* rt); int mcTBinsJ(const char* key, mcInt64* data, int nelem, mcRTable* rt); int mcTBinsE(const char* key, mcFloat32* data, int nelem, mcRTable* rt); int mcTBinsC(const char* key, mcComplexFloat32* data, int nelem, mcRTable* rt); int mcTBinsF(const char* key, mcFloat64* data, int nelem, mcRTable* rt); int mcTBinsZ(const char* key, mcComplexFloat64* data, int nelem, mcRTable* rt);
The mcTBins
functions insert data in a
relational table pointed to by rt
. Note that the
table must be loaded before data can be inserted (see
mcTBload
and
mcTBloadDesc
). If a key already exists in the
table an error will be flagged (to replace keys, make use of
mcTBrep
functions).
mcTBinsK
inserts a string in the relational
table (the string is NULL-terminated and thus implicitly
dimensioned). mcTBinsI
inserts
mcInt32
data in the relational table.
mcTBinsJ
inserts mcInt64
data in the relational table. mcTBinsE
inserts
mcFloat32
data in the relational table.
mcTBinsF
inserts mcFloat64
data in the relational table. mcTBins
C inserts
mcComplexFloat32
data in the relational table.
mcTBinsZ
inserts
mcComplexFloat64
data in the relational table.
The function returns the status. If completed successfully, the
function returns the status 0. Otherwise, a negative value
indicating the MemCom error number is returned.
key
Keyword assigned to data to be inserted (input).
data
Pointer to array of data to be inserted (input).
nelem
Number of elements of array to be inserted (input).
type
Data type of array to be inserted (input,
mcTBins
only). The data type must be
one of I
| J
| E |
F
| C
| Z |
K
.
rt
Pointer to relational table in memory (input).