[Back to Interface] [Prev] [Next]

SDdiminfo/sfgdinfo

intn SDdiminfo(int32 dim_id, char *name, int32 *size, int32 *data_type, int32 *num_attrs)

dim_id IN:

Dimension identifier returned by SDgetdimid

name OUT:

Name of the dimension

size OUT:

Size of the dimension

data_type OUT:

Data type of the dimension scale

num_attrs OUT:

Number of attributes assigned to the dimension

Purpose

Retrieves information about a dimension.

Return value

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

Description

SDdiminfo retrieves the name, size, data type, and number of values of the dimension specified by the parameter dim_id, and stores them in the parameters name, size, data_type, and num_attrs, respectively.

If the output value of the parameter size is set to 0, then the dimension specified by the dim_id parameter is unlimited. To get the number of records of an unlimited dimension, use SDgetinfo.

If scale information has been stored for this dimension via SDsetdimscale, the data_type parameter will contain the data type. Valid data types can be found in Table 1A of Section I of this manual. If no scale information has been stored for this dimension, the value returned in the data_type parameter will be 0.

If the user has not named the dimension via SDsetdimname, a default dimension name of "fakeDim[x]" will be generated by the library, where [x] denotes the dimension index. If the name is not desired, the parameter name can be set to NULL in C and an empty string in Fortran.

FORTRAN

integer function sfgdinfo(dim_id, name, size, data_type, num_attrs)

character*(*) name

integer dim_id, size, data_type, num_attrs



[Back to Interface] [Prev] [Next]

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