Help us improve by taking our short survey: https://www.hdfgroup.org/website-survey/

| HDF5 Last Updated on 2025-11-11 The HDF5 Field Guide

- Main Page
- Getting started
- User Guide
- Reference Manual
- Cookbook
- Technical Notes
- RFCs
- Specifications
- Glossary
- Full-Text Search
- About

Loading...
Searching...
No Matches
Functions
Complex Datatypes
Datatypes (H5T)

## Detailed Description

## Functions
hid_t | H5Tcomplex_create (hid_t base_type_id)
| Creates a new complex number datatype.

## Function Documentation

## ◆ H5Tcomplex_create()

hid_t H5Tcomplex_create | ( | hid_t | base_type_id | ) |

Creates a new complex number datatype.

Parameters

  [in] | base_type_id | Datatype identifier, datatype identifier for the base datatype of the complex number datatype. Must be a floating-point datatype.

Returns
  Returns a complex number datatype identifier if successful; otherwise returns H5I_INVALID_HID.

H5Tcomplex_create() creates a new complex number datatype consisting of real and imaginary number parts. The datatype for both parts of the new complex number datatype is based on `base_type_id`, which must be a floating-point datatype.

When necessary, use H5Tget_super() to determine the base datatype of the complex number datatype.

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

Since
  2.0.0