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

VSread/vsfrd/vsfrdc

int32 VSread(int32 vdata_id, uint8 *databuf, int32 n_records, int32 interlace)
vdata_id

IN:

Vdata access identifier returned from VSattach

databuf

OUT:

Buffer to store the retrieved data

n_records

IN:

Number of records to retrieve

interlace

IN:

Interlacing mode of the data stored in the buffer

Purpose

Retrieves data from the specified vdata.

Return value

Returns the total number of records read if successful and FAIL (or -1) otherwise.

Description

The number of records to be read must be specified in n_records and the interlace mode of the data in the buffer must be specified in interlace. Use FULL_INTERLACE (recommended) or NO_INTERLACE.

The vdata is first attached with read access, then VSsetfields is called to specify which field(s) are to be read from that vdata. Each subsequent call to VSread will return successive records from that vdata.

If the call is successful, the data returned in databuf is formatted according to the specified interlace mode, and the data fields appear in the order specified in the last call to VSsetfields for that vdata. To retrieve any arbitrary record from a vdata, use VSseek to specify the record position before calling VSread. Refer to the Reference Manual pages on VSseek and VSsetfields.

Note that there are two Fortran-77 versions of this routine; one for buffered numeric data (vsfrd) and the other for buffered character data (vsfrdc).

FORTRAN

integer function vsfrd(vdata_id, databuf, n_records, interlace)

integer vdata_id, n_records, interlace

<valid numeric data type> databuf(*)

integer function vsfrdc(vdata_id, databuf, n_records, interlace)

integer vdata_id, n_records, interlace

character*(*) databuf



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

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