H5T_ENUM_CREATE

The H5T_ENUM_CREATE function creates an enumeration datatype object.

Note: Name/value pairs must be assigned to the datatype before it is used to create a dataset. The dataset stores the state of the datatype at the time the dataset is created; additional changes to the datatype will not be reflected in the dataset.

Syntax

Result = H5T_ENUM_CREATE( [SampleValue] )

Return Value

Returns a long integer containing the identifier of the new enumeration datatype.

Note: Datatype identifiers created by this function should be released with H5T_CLOSE.

Arguments

SampleValue

By default, H5T_ENUM_CREATE creates an enumeration datatype that is a long (32-bit) integer. To override this default, set the SampleValue argument to an integer of the desired type. The actual integer value is irrelevant, only the IDL type matters. For example, to create an enumeration datatype of type short (16-bit), do the following

result = H5T_ENUM_CREATE(0s)

Keywords

None

Version History

6.3

Introduced

8.6.1

Added SampleValue argument.

See Also

H5T_ENUM_INSERT, H5T_CLOSE, H5T_ENUM_SET_DATA