HDFql Reference Manual v2.6.0

5.1Constants

A constant is an identifier whose associated value typically cannot be altered by the program during its execution. Using a constant instead of specifying a value multiple times in the program not only simplifies code maintenance but can also supply a meaningful name for it. Constants in the C programming language follow a naming convention of writing all words in uppercase and separating each word with an underscore (_). The following table summarizes all existing HDFql constants in C.

HDFql Constant in C Description Data Type Value
HDFQL_VERSIONRepresents the HDFql version in usechar *2.6.0
HDFQL_YESRepresents the concept “Yes”int0
HDFQL_NORepresents the concept “No”int-1
HDFQL_ENABLEDRepresents the concept “Enabled”int0
HDFQL_DISABLEDRepresents the concept “Disabled”int-1
HDFQL_UNLIMITEDRepresents the concept “Unlimited”int-1
HDFQL_UNDEFINEDRepresents the concept “Undefined”int-1
HDFQL_GLOBALRepresents the concept “Global”int1
HDFQL_LOCALRepresents the concept “Local”int2
HDFQL_TRACKEDRepresents the HDF5 tracked creation order strategyint1
HDFQL_INDEXEDRepresents the HDF5 indexed creation order strategyint2
HDFQL_CONTIGUOUSRepresents the HDF5 contiguous storage type (layout)int1
HDFQL_COMPACTRepresents the HDF5 compact storage type (layout)int2
HDFQL_CHUNKEDRepresents the HDF5 chunked storage type (layout)int4
HDFQL_EARLYRepresents the HDF5 early storage allocationint1
HDFQL_INCREMENTALRepresents the HDF5 incremental storage allocationint2
HDFQL_LATERepresents the HDF5 late storage allocationint4
HDFQL_DIRECTORYRepresents a directoryint1
HDFQL_FILERepresents a fileint2
HDFQL_GROUPRepresents the HDF5 group object typeint4
HDFQL_DATASETRepresents the HDF5 dataset object typeint8
HDFQL_ATTRIBUTERepresents the HDF5 attribute object typeint16
HDFQL_TINYINTRepresents the tiny integer data type (TINYINT)int1
HDFQL_UNSIGNED_TINYINTRepresents the unsigned tiny integer data type (UNSIGNED TINYINT)int2
HDFQL_SMALLINTRepresents the small integer data type (SMALLINT)int4
HDFQL_UNSIGNED_SMALLINTRepresents the unsigned small integer data type (UNSIGNED SMALLINT)int8
HDFQL_INTRepresents the integer data type (INT)int16
HDFQL_UNSIGNED_INTRepresents the unsigned integer data type (UNSIGNED INT)int32
HDFQL_BIGINTRepresents the big integer data type (BIGINT)int64
HDFQL_UNSIGNED_BIGINTRepresents the unsigned big integer data type (UNSIGNED BIGINT)int128
HDFQL_FLOATRepresents the float data type (FLOAT)int256
HDFQL_DOUBLERepresents the double data type (DOUBLE)int512
HDFQL_CHARRepresents the char data type (CHAR)int1024
HDFQL_VARTINYINTRepresents the variable-length tiny integer data type (VARTINYINT)int2048
HDFQL_UNSIGNED_VARTINYINTRepresents the unsigned variable-length tiny integer data type (UNSIGNED VARTINYINT)int4096
HDFQL_VARSMALLINTRepresents the variable-length small integer data type (VARSMALLINT)int8192
HDFQL_UNSIGNED_VARSMALLINTRepresents the unsigned variable-length small integer data type (UNSIGNED VARSMALLINT)int16384
HDFQL_VARINTRepresents the variable-length integer data type (VARINT)int32768
HDFQL_UNSIGNED_VARINTRepresents the unsigned variable-length integer data type (UNSIGNED VARINT)int65536
HDFQL_VARBIGINTRepresents the variable-length big integer data type (VARBIGINT)int131072
HDFQL_UNSIGNED_VARBIGINTRepresents the unsigned variable-length big integer data type (UNSIGNED VARBIGINT)int262144
HDFQL_VARFLOATRepresents the variable-length float data type (VARFLOAT)int524288
HDFQL_VARDOUBLERepresents the variable-length double data type (VARDOUBLE)int1048576
HDFQL_VARCHARRepresents the variable-length char data type (VARCHAR)int2097152
HDFQL_OPAQUERepresents the opaque data type (OPAQUE)int4194304
HDFQL_BITFIELDRepresents the bitfield data typeint8388608
HDFQL_ENUMERATIONRepresents the enumeration data type (ENUMERATION)int16777216
HDFQL_COMPOUNDRepresents the compound data type (COMPOUND)int33554432
HDFQL_REFERENCERepresents the reference data typeint67108864
HDFQL_LITTLE_ENDIANRepresents the little endian byte orderingint1
HDFQL_BIG_ENDIANRepresents the big endian byte orderingint2
HDFQL_MIXED_ENDIANRepresents the compound endian byte ordering (if endiannesses of its members are mixed)int4
HDFQL_ASCIIRepresents the ASCII character encodingint1
HDFQL_UTF8Represents the UTF-8 character encodingint2
HDFQL_NULLTERMRepresents the null terminated paddingint1
HDFQL_NULLPADRepresents the null paddingint2
HDFQL_SPACEPADRepresents the space paddingint4
HDFQL_FILL_DEFAULTRepresents the default fill typeint1
HDFQL_FILL_DEFINEDRepresents the (user) defined fill typeint2
HDFQL_FILL_UNDEFINEDRepresents the undefined fill typeint4
HDFQL_FILL_NEVERRepresents the never fill typeint8
HDFQL_VERSION_EARLIESTRepresents the earliest HDF5 library bound versionint1
HDFQL_VERSION_LATESTRepresents the latest HDF5 library bound versionint2
HDFQL_VERSION_18Represents the HDF5 library bound version 1.8int4
HDFQL_VERSION_110Represents the HDF5 library bound version 1.10int2
HDFQL_SUCCESSRepresents an operation that succeededint0
HDFQL_ERROR_PARSERepresents an operation that failed due to a parsing errorint-1
HDFQL_ERROR_NOT_SPECIFIEDRepresents an operation that failed due to information not being specified (i.e. missing)int-2
HDFQL_ERROR_NOT_FOUNDRepresents an operation that failed due to an object (e.g. directory, file, group, dataset) not being foundint-3
HDFQL_ERROR_NO_ACCESSRepresents an operation that failed due to an object (e.g. directory, file, group, dataset) not being accessibleint-4
HDFQL_ERROR_NOT_OPENRepresents an operation that failed due to an object (e.g. file) not being openedint-5
HDFQL_ERROR_TEMPORARILY_UNAVAILABLERepresents an operation that failed due to a file being temporarily unavailable (e.g. unable to lock the file)int-6
HDFQL_ERROR_INVALID_NAMERepresents an operation that failed due to the name of an object (e.g. directory, file, group, dataset) being invalidint-7
HDFQL_ERROR_INVALID_FILERepresents an operation that failed due to a file being invalid (e.g. not a valid HDF5 file)int-8
HDFQL_ERROR_NOT_SUPPORTEDRepresents an operation that failed due to not being supportedint-9
HDFQL_ERROR_NOT_ENOUGH_SPACERepresents an operation that failed due to the machine not having enough (storage) spaceint-10
HDFQL_ERROR_NOT_ENOUGH_MEMORYRepresents an operation that failed due to the machine not having enough (RAM) memoryint-11
HDFQL_ERROR_ALREADY_EXISTSRepresents an operation that failed due to an object (e.g. directory, file, group, dataset) already existingint-12
HDFQL_ERROR_EMPTYRepresents an operation that failed due to its internal structure being emptyint-13
HDFQL_ERROR_FULLRepresents an operation that failed due to its internal structure being fullint-14
HDFQL_ERROR_BEFORE_FIRSTRepresents an operation that failed due to trying to position/access an element before the first oneint-15
HDFQL_ERROR_AFTER_LASTRepresents an operation that failed due to trying to position/access an element after the last oneint-16
HDFQL_ERROR_OUTSIDE_LIMITRepresents an operation that failed due to being outside the limitint-17
HDFQL_ERROR_NO_ADDRESSRepresents an operation that failed due to a user-defined variable having no address (i.e. being NULL)int-18
HDFQL_ERROR_UNEXPECTED_TYPERepresents an operation that failed due to an object (e.g. group, dataset) being of an unexpected typeint-19
HDFQL_ERROR_UNEXPECTED_DATA_TYPERepresents an operation that failed due to a user-defined variable being of an unexpected data typeint-20
HDFQL_ERROR_UNEXPECTED_STORAGE_TYPERepresents an operation that failed due to a dataset being of an unexpected storage type (layout)int-21
HDFQL_ERROR_NOT_REGISTEREDRepresents an operation that failed due to a user-defined variable not being registeredint-23
HDFQL_ERROR_INVALID_OPERATIONRepresents an operation that failed due to being invalidint-24
HDFQL_ERROR_INVALID_REGULAR_EXPRESSIONRepresents an operation that failed due to a regular expression being invalidint-25
HDFQL_ERROR_INVALID_SELECTIONRepresents an operation that failed due to a (hyperslab or point) selection being invalidint-26
HDFQL_ERROR_UNKNOWNRepresents an operation that failed due to an unknown/unexpected errorint-99

Table 5.1 – HDFql constants in C

HDFql also supports other programming languages, namely C++, Java, Python, C#, Fortran, R, and MATLAB, through shared libraries and wrappers. The tables below provide examples of how HDFql constants are defined in these programming languages.

In C++, the prefix “HDFQL_” of the names of constants (defined in C) is replaced by the namespace “HDFql”, and its underscores (_) are discarded. The remainder of the names of constants follows the upper camel-case convention. The following table lists a subset of HDFql constants as defined in C and details how these are defined/can be used in C++.

HDFql Constant in C Corresponding Definition in C++
HDFQL_VERSIONHDFql::Version
HDFQL_SUCCESSHDFql::Success
HDFQL_ERROR_PARSEHDFql::ErrorParse
HDFQL_TINYINTHDFql::Tinyint
HDFQL_UNSIGNED_BIGINTHDFql::UnsignedBigint
HDFQL_UTF8HDFql::Utf8

Table 5.2 – HDFql constants in C and their corresponding definitions in C++

In Java, the prefix “HDFQL_” of the names of constants (defined in C) is replaced by the class “HDFql”. The remainder of the names of constants remains exactly the same. The following table lists a subset of HDFql constants as defined in C and details how these are defined/can be used in Java.

HDFql Constant in C Corresponding Definition in Java
HDFQL_VERSIONHDFql.VERSION
HDFQL_SUCCESSHDFql.SUCCESS
HDFQL_ERROR_PARSEHDFql.ERROR_PARSE
HDFQL_TINYINTHDFql.TINYINT
HDFQL_UNSIGNED_BIGINTHDFql.UNSIGNED_BIGINT
HDFQL_UTF8HDFql.UTF8

Table 5.3 – HDFql constants in C and their corresponding definitions in Java

In Python, the prefix “HDFQL_” of the names of constants (defined in C) is replaced by the class “HDFql”. The remainder of the names of constants remains exactly the same. The following table lists a subset of HDFql constants as defined in C and details how these are defined/can be used in Python.

HDFql Constant in C Corresponding Definition in Python
HDFQL_VERSIONHDFql.VERSION
HDFQL_SUCCESSHDFql.SUCCESS
HDFQL_ERROR_PARSEHDFql.ERROR_PARSE
HDFQL_TINYINTHDFql.TINYINT
HDFQL_UNSIGNED_BIGINTHDFql.UNSIGNED_BIGINT
HDFQL_UTF8HDFql.UTF8

Table 5.4 – HDFql constants in C and their corresponding definitions in Python

In C#, the prefix “HDFQL_” of the names of constants (defined in C) is replaced by the class “HDFql”, and its underscores (_) are discarded. The remainder of the names of constants follows the upper camel-case convention. The following table lists a subset of HDFql constants as defined in C and details how these are defined/can be used in C#.

HDFql Constant in C Corresponding Definition in C#
HDFQL_VERSIONHDFql.Version
HDFQL_SUCCESSHDFql.Success
HDFQL_ERROR_PARSEHDFql.ErrorParse
HDFQL_TINYINTHDFql.Tinyint
HDFQL_UNSIGNED_BIGINTHDFql.UnsignedBigint
HDFQL_UTF8HDFql.Utf8

Table 5.5 – HDFql constants in C and their corresponding definitions in C#

In Fortran, the names of constants are the same as in C and can be written in any case. The following table lists a subset of HDFql constants as defined in C and details how these are defined/can be used in Fortran.

HDFql Constant in C Corresponding Definition in Fortran
HDFQL_VERSIONHDFQL_VERSION
HDFQL_SUCCESSHDFQL_SUCCESS
HDFQL_ERROR_PARSEHDFQL_ERROR_PARSE
HDFQL_TINYINTHDFQL_TINYINT
HDFQL_UNSIGNED_BIGINTHDFQL_UNSIGNED_BIGINT
HDFQL_UTF8HDFQL_UTF8

Table 5.6 – HDFql constants in C and their corresponding definitions in Fortran

In R, the names of constants are the same as in C. The following table lists a subset of HDFql constants as defined in C and details how these are defined/can be used in R.

HDFql Constant in C Corresponding Definition in R
HDFQL_VERSIONHDFQL_VERSION
HDFQL_SUCCESSHDFQL_SUCCESS
HDFQL_ERROR_PARSEHDFQL_ERROR_PARSE
HDFQL_TINYINTHDFQL_TINYINT
HDFQL_UNSIGNED_BIGINTHDFQL_UNSIGNED_BIGINT
HDFQL_UTF8HDFQL_UTF8

Table 5.7 – HDFql constants in C and their corresponding definitions in R

In MATLAB, the prefix “HDFQL_” of the names of constants (defined in C) is replaced by the class “HDFql”. The remainder of the names of constants remains exactly the same. The following table lists a subset of HDFql constants as defined in C and details how these are defined/can be used in MATLAB.

HDFql Constant in C Corresponding Definition in MATLAB
HDFQL_VERSIONHDFql.VERSION
HDFQL_SUCCESSHDFql.SUCCESS
HDFQL_ERROR_PARSEHDFql.ERROR_PARSE
HDFQL_TINYINTHDFql.TINYINT
HDFQL_UNSIGNED_BIGINTHDFql.UNSIGNED_BIGINT
HDFQL_UTF8HDFql.UTF8

Table 5.8 – HDFql constants in C and their corresponding definitions in MATLAB