[Back to Interface] [Prev] [Next]

DFSDgetdata/dsgdata

intn DFSDgetdata(char *filename, intn rank, int32 dimsizes[], VOIDP data)

filename IN:

Name of the file

rank IN:

Number of dimensions

dimsizes IN:

Dimensions of the data buffer

data OUT:

Buffer for the data

Purpose

Reads the next dataset in the file.

Return value

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

Description

If the values of rank or dimsizes aren't known, DFSDgetdims must be called to retrieve them and then use them to determine the buffer space needed for the array data. If the data type of the data in a scientific dataset isn't know, DFSDgetNT must be called to retrieve it. Subsequent calls to DFSDgetdata (or to DFSDgetdims and DFSDgetdata)will sequentially read scientific datasets from the file. For example, if DFSDgetdata is called three times in succession, the third call reads data from the third scientific dataset in the file.

If DFSDgetdims or DFSDgetdata is called and there are no more scientific datasets left in the file, an error code is returned and nothing is read. DFSDrestart can be used to override this convention.

FORTRAN

integer function dsgdata(filename, rank, dimsizes, data)

character*(*) filename

integer rank

integer dimsizes(*), data(*)



[Back to Interface] [Prev] [Next]

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