Information about a table can be retrieved using two functions, H5TBget_table_info
and H5TBget_field_info
. The H5TBget_table_info
retrieves the table dimensions, that is,
the number of records and the number of fields. In the example we call this
function as
H5TBget_table_info ( file_id, "Table1", &nfields_out, &nrecords_out );
The H5TBget_field_info
retrieves the names, the sizes, the
offsets of the fields, as well as the size of the compound datatype. In the example we call this function as
H5TBget_field_info( file_id, "Table1", names_out, sizes_out, offset_out,
size_out );
The following C program provide an example of how to retrieve information from a table. The corresponding HDF5 file that is generated is also referenced here. You can use an HDF5 file browser to access this file by clicking on the link below.
ex_table_06.c
ex_table_06.h5
NOTE: To download a tar file of all of the examples, including a Makefile, please go to the Index page.