[Back to Interface] [Prev] [Next]

DFSDgetdims/dsgdims

intn DFSDgetdims(char *filename, intn *rank, int32 dimsizes[], intn maxrank)

filename IN:

Name of the HDF file

rank OUT:

Number of dimensions

dimsizes OUT:

Buffer for the returned dimensions

maxrank IN:

Size of the storage buffer dimsizes

Purpose

Retrieves the number of dimensions (rank) of the dataset and the sizes of the dimensions (dimsizes) for the next scientific dataset in the file.

Return value

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

Description

The maxrank parameter tells DFSDgetdims the size of the array that is allocated for storing the dimsizes array. The value of rank must not exceed the value of maxrank.

The allocation of a buffer for the scientific dataset data should correspond to the values retrieved by DFSDgetdims. The first value in the array dimsizes should equal the first dimension of the array that is allocated to hold the dataset; the second value in dimsizes should equal the second dimension of the dataset, and so forth.

FORTRAN

integer function dsgdims(filename, rank, dimsizes, maxrank)

character*(*) filename

integer rank, maxrank

integer dimsizes(*)



[Back to Interface] [Prev] [Next]

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