[Back to Interface] [Prev] [Next]

Hoffset

int32 Hoffset(int32 file_id, uint16 tag, uint16 ref)

file_id IN:

File identifier returned by Hopen

tag IN:

Tag of the data element

ref IN:

Reference number of the data element

Purpose

Returns the offset of a data element in the file.

Return value

Returns the offset of the data element if the data element exists and FAIL (or -1) otherwise.

Description

Hoffset calls Hstartread, HQueryoffset, and Hendaccess to determine the length of a data element. Hoffset uses Hstartread to obtain an access identifier for the specified data object.

Hoffset will return the correct offset for a linked-block element, however it is important to remember that the data in linked-block elements is not stored contiguously. The offset returned by Hoffset only reflects the position of the first data block.

Hoffset should not be used to determine the offset of an external element. In this case, Hoffset returns zero, an invalid offset for HDF files.



[Back to Interface] [Prev] [Next]

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