[Back to Interface] [Prev] [Next]

SDgetdatastrs/sfgdtstr

intn SDgetdatastrs(int32 sds_id, char *label, char *unit, char *format, char *coordsys, intn length)

sds_id IN:

Data set identifier returned by SDcreate or SDselect

label OUT:

Label (predefined attribute)

unit OUT:

Unit (predefined attribute)

format OUT:

Format (predefined attribute)

coordsys OUT:

Coordinate system (predefined attribute)

length IN:

Maximum length of the above predefined attributes

Purpose

Retrieves the predefined attributes of a data set.

Return value

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

Description

SDgetdatastrs retrieves the predefined attributes for the data set specified by the parameter sds_id. The predefined attributes are label, unit, format, and coordinate system. They are then stored in the parameters label, unit, format, and coordsys, respectively. Refer to Section 3.10 of the HDF User's Guide for more information on predefined attributes.

If a particular data string is not stored, the first character of the corresponding SDgetdatastrs parameter is '\0' in C. In FORTRAN, the parameter contains an empty string. Each string buffer must include the space to hold the null termination character. In C, if a user does not want a string back, NULL can be passed in for that string. Data strings are set by the SDsetdatastrs routine.

FORTRAN

integer function sfgdtstr(sds_id, label, unit, format, coordsys, length)

integer sds_id, length

character*(*) label, unit, format, coordsys



[Back to Interface] [Prev] [Next]

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