[Top] [Prev] [Next] [Bottom]

Hwrite

int32 Hwrite(int32 h_id, int32 length, VOIDP data)
h_id

IN:

Access identifier returned by Hstartwrite

len

IN:

Length of segment to be written

data

IN:

Pointer to the data to be written

Purpose

Writes the next data segment to a specified data element.

Return value

Returns the length of the segment actually written if successful and FAIL (or -1) otherwise.

Description

Hwrite begins writing at the current position of the access identifier, writes the specified number of bytes, then moves the access identifier to the position immediately following the last accessed byte. Calling Hwrite with length = 0 results iu an error condition. To reposition an access identifier before writing data, use Hseek.

If the space allocated in the data element is smaller than the length of data, the data is truncated to the length of the data element. Although only one access identifier is allowed per data element, it is possible to interlace writes to more than one data element in a file.



[Top] [Prev] [Next] [Bottom]

hdfhelp@ncsa.uiuc.edu
HDF User's Reference Manual, Draft 06/09/97, NCSA HDF Development Group.