HDF_SD_REFTOINDEX

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

Calling Sequence

Result = HDF_SD_REFTOINDEX( SD_ID, Refno )

Arguments

SD_ID

An SD interface ID as returned by HDF_SD_START.

Refno

The SD reference number for the desired dataset.

Example

sd_id = HDF_SDSTART('demo.hdf') ; Initialize the SD interface.

refno = 66 ; Define the reference number for which we want to search.

index = HDF_SD_REFTOINDEX(sd_id, refno) ; Return the index number.

sds_id = HDF_SD_SELECT(sd_id, index) ; Now the dataset can be accessed.

HDF_SD_ENDACCESS,SDS_ID ; End access.

HDF_SD_END, sd_id

See Also

HDF_SD_IDTOREF, HDF_SD_NAMETOINDEX