3.1   Basic Numeric Data Types

This section describes the usage of basic numeric data types. Since C made no assumption about the size of integers prior to the introduction of the C99 standard, HALCON versions 20.11 and earlier define the following types:


Type Name C99 Type Name Size/Range of Values

INT1 int8_t one byte with sign

HBYTE uint8_t one byte, unsigned

UINT1 uint8_t the same as HBYTE

INT2 int16_t two bytes with sign (generally short)

UINT2 uint16_t two bytes, unsigned

INT4 int32_t four bytes with sign

UINT4 uint32_t four bytes, unsigned

INT4_8 four (on 32 bit systems) or eight (on 64 bit systems) bytes with sign

UINT4_8 four (on 32 bit systems) or eight (on 64 bit systems) bytes, unsigned

HINT int At least two, maximal eight bytes with sign

HUINT unsigned At least two, maximal eight bytes, unsigned

Using these types ensures the portability of HALCON operators. If the extension package need not be compilable for HALCON 20.11 or earlier versions, the C99 data types (defined in the stdint.h header file) should be used where applicable. Note that C99 does not define any types that exactly match the INT4_8 or UINT4_8 types.