MemCom Reference Manual > MemCom Architecture > Datasets > Data Types

2. Data Types

Datasets usually contain typed data, as is the rule for data stored on the MemCom databases. By default, data are stored in little-endian IEEE format on the databases. If needed, data are transformed to the proper application format when reading and writing. The table below displays the MemCom data types and their C/C++/Fortran counterparts.

Table 2.1. MemCom data types

TypeDescriptionSize (bits)C/C++ data typeFortran data type (ftn API)
ISigned integer format.32mcInt32mcf_i4 (integer*4)
JSigned long integer format.64mcInt64mcf_i8 (integer*8)
ESingle precision floating-point format.32mcFloat32mcf_r4 (real*4)
CSingle precision complex floating-point format.64mcComplexFloat32mcf_c4 (complex*4)
FDouble precision floating-point format.64mcFloat64mcf_r8 (real*8)
ZDouble precision complex floating-point format128mcComplexFloat64mcf_c8 (complex*8)
KCharacter string.8char []character*n
$Relational table.-mcRTablemcf_rtable
ATArray table.-NoneNone
STSparse table.-NoneNone
UUnspecified format, i.e byte array (not the same as a string!)8char []integer*1


The MemCom data types are identified by character strings as described in column 1 of the above table. MemCom will also accept and preserve unspecified data types. However, for the unspecified data types there is no built-in relation between the data size and the number of bytes required to represent a data element. In addition, unspecified data types cannot be converted.

Auxiliary data types are defined for C/C++ and Fortran applications (see table below). These data types ensure the consistency of platform-dependent function call arguments, such as pointers (addresses in memory) of file offsets.

Table 2.2. Auxiliary data types

Data type descriptionSize (bits)C/C++ data typeFortran data type
Variable storing the size of objects in memory.32/64mcSizemcf_size
Variable storing the size of objects in memory (signed!).32/64mcSSizemcf_ssize
Variable storing a file offset (file address) or the size of a file or portions of it.32/64mcOffmcf_off
Variable storing a pointer, i.e a memory address.32/64void*mcf_ptr
Variable storing distance between pointers.32/64ptrdiff_tmcf_ptr