The HDF_SD_REFTOINDEX function returns a scientific dataset’s index given its reference number and SD interface ID.

Examples


; Initialize the SD interface:
SDinterface_id = HDF_SDSTART('demo.hdf')
; Define the reference number for which we want to search:
Reference_number = 66
; Return the index number:
index = HDF_SD_REFTOINDEX(SDinterface_id, Reference_number)
; Now the dataset can be accessed:
SDdataset_id = HDF_SD_SELECT(SDinterface_id, index)
; End access:
HDF_SD_ENDACCESS,SDdataset_id
HDF_SD_END, SDinterface_id

Syntax


Result = HDF_SD_REFTOINDEX(SDinterface_id, Reference_number)

Return Value


Returns the index number associated with the specified SD dataset.

Arguments


SDinterface_id

An SD interface ID as returned by HDF_SD_START.

Reference_number

The SD reference number for the desired dataset.

Keywords


None

Version History


4.0

Introduced

See Also


HDF_SD_IDTOREF, HDF_SD_NAMETOINDEX