[Back to Interface] [Prev] [Next]

SDgetinfo/sfginfo

intn SDgetinfo(int32 sds_id, char *sds_name, int32 *rank, int32 dimsizes[], int32 *data_type, int32 *num_attrs)

sds_id IN:

Data set identifier returned by SDcreate and SDselect

sds_name OUT:

Name of the data set

rank OUT:

Number of dimensions in the data set

dimsizes OUT:

Array containing the size of each dimension in the data set

data_type OUT:

Data type for the data stored in the data set

num_attrs OUT:

Number of attributes for the data set

Purpose

Retrieves the name, rank, dimension sizes, data type and number of attributes for a data set.

Return value

Returns SUCCEED (or 0) if successful and FAIL (or -1) otherwise.

Description

SDgetinfo retrieves the name, number of dimensions, sizes of dimensions, data type, and number of attributes of the data set identified by sds_id, and stores them in the parameters sds_name, rank, dimsizes, data_type, and num_attrs, respectively.

The buffer sds_name can have at most 64 characters. If the name of the data set is not desired, then the parameter sds_name can be set to NULL in C and an empty string in Fortran.

The maximum value of the rank parameter is MAX_VAR_DIMS (or 32).

If the data set is created with an unlimited dimension, then in the C interface, the first element of the dimsizes array (corresponding to the slowest-changing dimension) contains the number of records in the unlimited dimension; in the FORTRAN-77 interface, the last element of the dimsizes array (corresponding to the slowest-changing dimension) contains this information. Use SDisrecord to determine if the data set has an unlimited dimension.

FORTRAN

integer function sfginfo(sds_id, sds_name, rank, dimsizes, data_type, num_attrs)

character*(*) sds_name

integer sds_id, rank, dimsizes(*)

integer data_type, num_attrs



[Back to Interface] [Prev] [Next]

hdfhelp@ncsa.uiuc.edu
HDF Reference Manual - 07/29/98, NCSA HDF Development Group.