Last modified: 18 August 2010
Name: H5Tinsert
Signature:
  herr_t `H5Tinsert`( hid_t `dtype_id`, const char * `name`, size_t `offset`, hid_t `field_id` )

Purpose:
  Adds a new member to a compound datatype.

Description:
  `H5Tinsert` adds another member to the compound datatype `dtype_id`. The new member has a `name` which must be unique within the compound datatype. The `offset` argument defines the start of the member in an instance of the compound datatype, and `field_id` is the datatype identifier of the new member.

  Note: Members of a compound datatype do not have to be atomic datatypes; a compound datatype can have a member which is a compound datatype.

Parameters:

  hid_t `dtype_id` | IN: Identifier of compound datatype to modify.
  const char * `name` | IN: Name of the field to insert.
  size_t `offset` | IN: Offset in memory structure of the field to insert.
  hid_t `field_id` | IN: Datatype identifier of the field to insert.

Returns:
  Returns a non-negative value if successful; otherwise returns a negative value.

Fortran90 Interface: h5tinsert_f

      SUBROUTINE h5tinsert_f(type_id,  name, offset, field_id, hdferr)
        IMPLICIT NONE
        INTEGER(HID_T), INTENT(IN) :: type_id  ! Datatype identifier
        CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the field to insert
        INTEGER(SIZE_T), INTENT(IN) :: offset  ! Offset in memory structure
                                               ! of the field to insert
        INTEGER(HID_T), INTENT(IN) :: field_id ! Datatype identifier of the
                                               ! new member
        INTEGER, INTENT(OUT) :: hdferr         ! Error code
                                               ! 0 on success and -1 on failure
      END SUBROUTINE h5tinsert_f