Last modified: 24 September 2010
Name: H5Tget_order
Signature:
  H5T_order_t `H5Tget_order`( hid_t `dtype_id` )

Purpose:
  Returns the byte order of an atomic datatype.

Description:
  `H5Tget_order` returns the byte order of an atomic datatype.

  Possible return values are:

  `H5T_ORDER_LE` (`0`)
    Little-endian byte order
  `H5T_ORDER_BE` (`1`)
    Big-endian byte order
  `H5T_ORDER_VAX` (`2`)
    VAX mixed byte order
  `H5T_ORDER_MIXED` (`3`)
    Mixed byte order among members of a compound datatype (see below)
  `H5T_ORDER_NONE` (`4`)
    No particular order (fixed-length strings, object and region references)

  Members of a compound datatype need not have the same byte order. If members of a compound datatype have more than one of little endian, big endian, or VAX byte order, `H5Tget_order` will return `H5T_ORDER_MIXED` for the compound datatype. A byte order of `H5T_ORDER_NONE` will, however, be ignored; for example, if one or more members of a compound datatype have byte order `H5T_ORDER_NONE` but all other members have byte order `H5T_ORDER_LE`, `H5Tget_order` will return `H5T_ORDER_LE` for the compound datatype.

Parameters:

  hid_t `dtype_id` | IN: Identifier of datatype to query.

Returns:
  Returns a byte order constant if successful; otherwise `H5T_ORDER_ERROR` (-1).

Fortran90 Interface: h5tget_order_f

      SUBROUTINE h5tget_order_f(type_id, order, hdferr)
        IMPLICIT NONE
        INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
        INTEGER, INTENT(OUT) :: order         ! Datatype byte order
                                              ! Possible values are:
                                              !    H5T_ORDER_LE_F
                                              !    H5T_ORDER_BE_F
                                              !    H5T_ORDER_VAX_F
                                              !    H5T_ORDER_MIXED_F
                                              !      (not implemented)
                                              !    H5T_ORDER_NONE_F
        INTEGER, INTENT(OUT) :: hdferr        ! Error code
                                              ! 0 on success and -1 on failure
      END SUBROUTINE h5tget_order_f

History:

  Release | Change
  1.8.6 | Function modified to work with all datatypes. `H5T_ORDER_MIXED` added to `H5T_order_t`.