Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Content Layer
id1195548671
Content Column
width50.00001%
id1195578110
classrm_pagetree_col mobile-hide
Content Block
id1195578111
 
Content Column
width50.00001%
id1195548673
classhdf-rm-main-column
Content Block
id1195548672

Include Content
render-without-blockstrue
page.rm-navbar
HTML Wrap
classhdf-print-only

Page Title

HTML Wrap
classhdf-rm-summary-block

Hdf rm anchor
AnchorNamesummary

Excerpt

Creates a new datatype.

HTML Wrap
classhdf-rm-content-block

Hdf rm anchor
AnchorNameprocedure

Procedure:
HTML Wrap
classhdf-rm-section
HTML Wrap
classhdf_procedure

H5T_CREATE(class, size)

Hdf rm anchor
AnchorNamesignature

Signature:
HTML Wrap
classhdf-rm-section
HTML Wrap
classhdf-togglebox hdf-c

HTML Add Class
hdf-togglebutton-visible
hdf-togglebutton-visible
selector.hdf-togglebutton.hdf-c

HTML
<pre><code class="language-c">hid_t H5Tcreate( H5T_class_t class, size_tsize )</code></pre>
HTML Wrap
classhdf-togglebox hdf-fortran hdf-togglebox-hidden

HTML Add Class
hdf-togglebutton-visible
hdf-togglebutton-visible
selector.hdf-togglebutton.hdf-fortran

HTML
<pre><code class="language-fortran">SUBROUTINE h5tcreate_f(class, size, type_id, hdferr) 
  IMPLICIT NONE
  INTEGER, INTENT(IN) :: class             ! Datatype class can be one of
                                           !    H5T_COMPOUND_F
                                           !    H5T_OPAQUE_F
                                           !    H5T_ENUM_F
                                           !    H5T_STRING_F
  INTEGER(SIZE_T), INTENT(IN) :: size      ! Size of the datatype
  INTEGER(HID_T), INTENT(OUT) :: type_id   ! Datatype identifier
  INTEGER, INTENT(OUT) :: hdferr           ! Error code
                                           ! 0 on success and -1 on failure
END SUBROUTINE h5tcreate_f</code></pre>

Hdf rm anchor
AnchorNameparameters

Parameters:
HTML Wrap
classhdf-rm-section
H5T_class_t class    IN: Class of datatype to create; valid values include: 
    H5T_COMPOUND 
    H5T_OPAQUE 
    H5T_ENUM 
    H5T_STRING
size_t sizeIN: Size, in bytes, of the datatype being created

Hdf rm anchor
AnchorNamedescription

Description:
HTML Wrap
classhdf-rm-section

H5Tcreate H5T_CREATE creates a new datatype of the specified class with the specified number of bytes. This function is used only with the following datatype classes:

  • H5T_COMPOUND
  • H5T_OPAQUE
  • H5T_ENUM
  • H5T_STRING

Other datatypes, including integer and floating-point datatypes, are typically created by using H5Tcopy to copy and modify a predefined datatype.

When creating a variable-length string datatype, size must be H5T_VARIABLE; see Creating variable-length string datatypes.

When creating a fixed-length string datatype, size will be the length of the string in bytes. The length of the string in characters will depend on the encoding used; see  H5PsetH5P_char_encodingSET_CHAR_ENCODING .

ENUMs created with this function have a signed native integer base datatype. Use  H5Tenum_createH5T_ENUM_CREATE if a different integer base datatype is required.

The datatype identifier returned from this function should be released with H5T_CLOSE H5Tclose or resource leaks will result.

Hdf rm anchor
AnchorNamereturns

Returns:
HTML Wrap
classhdf-rm-section

Returns datatype identifier if successful; otherwise returns a negative value.

Hdf rm anchor
AnchorNameexample

Example:
HTML Wrap
classhdf-rm-section

Coming Soon!

Comment
HTML Wrap
classhdf-togglebox hdf-c

Bitbucket Server file
repoSlughdf5
branchIdrefs/heads/1.10/master
projectKeyHDFFV
filepathexamples/h5_subset.c
showLineNumberstrue
lineStart32
progLangcpp
lineEnd42
applicationLink5ac7b370-7412-3c8c-ad20-807a68261336

HTML Wrap
classhdf-togglebox hdf-fortran hdf-togglebox-hidden

Bitbucket Server file
repoSlughdf5
branchIdrefs/heads/1.10/master
projectKeyHDFFV
filepathfortran/examples/compound.f90
showLineNumberstrue
lineStart25
progLangplain
lineEnd35
applicationLink5ac7b370-7412-3c8c-ad20-807a68261336

Hdf rm anchor
AnchorNamehistory

History:
HTML Wrap
classhdf-rm-section
Release    Change
1.8.8String datatype capability added to function in this release.