6.1.2UNSIGNED TINYINT
The HDFql UNSIGNED TINYINT data type stores values between 0 and 255 and occupies 1 byte in memory. It represents the data type of an HDF5 H5T_NATIVE_UCHAR dataset/attribute or of a result set that stores elements of this type (which can be retrieved using the HDFQL_CURSOR_GET_UNSIGNED_TINYINT function when working with cursors). Depending on the programming language supported by HDFql, the UNSIGNED TINYINT data type is represented by:
- In C, the “unsigned char” data type.
- In C++, the “unsigned char” data type.
- In Java2, the “byte” data type (or corresponding wrapper class “Byte”).
- In Python, the “uint8” NumPy data type.
- In C#, the “Byte” data type (or corresponding alias “byte”).
- In Fortran3, the “INTEGER(KIND = 1)” data type.
- In R4, the “integer” data type.
- In MATLAB, the “uint8” data type.
Notes
- By design, Java does not support unsigned data types. Therefore, the programmer is responsible for converting a signed number to its equivalent unsigned representation in Java. ↩
- Although there have been some efforts to introduce unsigned data types in Fortran, none are currently standardized. Therefore, the programmer is responsible for converting a signed number to its equivalent unsigned representation in Fortran. ↩
- By design, R does not provide a data type that stores values between 0 and 255 using exactly 1 byte of memory. As a substitute, the R “integer” data type may be used, at the cost of increased memory usage (as it occupies 4 bytes of memory) and lower performance (as byte alignment must be performed by HDFql). ↩