Quantcast

Documentation Center

  • Trial Software
  • Product Updates

H5T.enum_create

Create new enumeration data type

Syntax

output = H5T.enum_create(parent_id)

Description

output = H5T.enum_create(parent_id) creates a new enumeration data type based on the specified base data type, parent_id, which must be an integer type. output is a data type identifier for the new enumeration data type.

Examples

parent_id = H5T.copy('H5T_NATIVE_UINT');
type_id = H5T.enum_create(parent_id);
H5T.enum_insert(type_id,'red',1);
H5T.enum_insert(type_id,'green',2);
H5T.enum_insert(type_id,'blue',3);
H5T.close(type_id);
H5T.close(parent_id);

See Also

Was this topic helpful?