[Back to Interface] [Prev] [Next]

Hfind

intn Hfind(int32 file_id, uint16 search_tag, uint16 search_ref, uint16 *find_tag, uint16 *find_ref, int32 *find_offset, int32 *find_length, intn direction)

file_id IN:

File identifier returned by Hopen

search_tag IN:

The tag to search for or DFTAG_WILDCARD

search_ref IN:

Reference number to search for or DFREF_WILDCARD

find_tag IN/OUT:

If (*find_tag == 0) and (*find_ref == 0) then start the search from either the beginning or the end of the file. If the object is found, the tags of the object will be returned here.

find_ref IN/OUT:

If (*find_tag == 0) and (*find_ref == 0) then start the search from either the beginning or the end of the file. If the object is found, the reference numbers of the object will be returned here.

find_offset OUT:

Offset of the data element found

find_length OUT:

Length of the data element found

direction IN:

Direction to search in DF_FORWARD searches forward from the current location, and DF_BACKWARD searches backward from the current location

Purpose

Locates the next object to be searched for in an HDF file.

Return value

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

Description

Hfind searches for the next data element that matches the specified tag and reference number. Wildcards apply. If direction is DF_FORWARD, searching is forward from the current position in the file, otherwise DF_BACKWARD specifies backward searches from the current position in the file.

If find_tag and find_ref are both set to 0, this indicates the beginning of a search, and the search will start from the beginning of the file if the direction is DF_FORWARD and from the end of the file if the direction is DF_BACKWARD.



[Back to Interface] [Prev] [Next]

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