The HDF_SD_NAMETOINDEX function returns an SD dataset index given its name and SD interface ID. An error message is printed if the dataset cannot be located. The returned index can be used by HDF_SD_SELECT to access an SD dataset.
Examples
SDinterface_id = HDF_SD_START('demo.hdf')
index = HDF_SD_NAMETOINDEX(SDinterface_id, 'variable_2')
SDdataset_id=HDF_SD_SELECT(SDinterface_id,index)
HDF_SD_ENDACCESS, SDdataset_id
HDF_SD_END, SDinterface_id
Syntax
Result = HDF_SD_NAMETOINDEX(SDinterface_id, SDS_Name)
Return Value
Returns the specified SD dataset index number.
Arguments
SDinterface_id
An SD interface ID as returned by HDF_SD_START.
SDS_Name
A string containing the name of the SD dataset be located.
Keywords
None
Version History
See Also
HDF_SD_REFTOINDEX, HDF_SD_SELECT, HDF_SD_START