Documentation Center

  • Trial Software
  • Product Updates

H5T.enum_insert

Insert enumeration data type member

Syntax

H5T.enum_insert(type_id,name,value)

Description

H5T.enum_insert(type_id,name,value) inserts a new enumeration data type member into the enumeration data type specified by type_id. The name argument is a text string that specifies the name of the new member of the enumeration and value is the value of the member.

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?