[Back to Interface] [Prev] [Next]

VSlone/vsflone

int32 VSlone(int32 file_id, int32 ref_array[], int32 maxsize)

file_id IN:

File identifier returned by Hopen

ref_array OUT:

Array of reference numbers

max_refs IN:

Maximum number of lone vdatas to be retrieved

Purpose

Retrieves the reference numbers of all lone vdatas, i.e., vdatas that are not grouped with other objects, in a file.

Return value

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

Description

VSlone retrieves the reference numbers of lone vgroups in the file identified by the parameter file_id. Although VSlone returns the number of lone vdatas in the file, only at most max_refs reference numbers are retrieved and stored in the buffer ref_array. The array must have at least max_refs elements.

An array size of 65,000 integers for ref_array is more than adequate if the user chooses to declare the array statically. However, the preferred method is to dynamically allocate memory instead; first call VSlone with a value of 0 for max_refs to return the total number of lone vdatas, then use the returned value to allocate memory for ref_array before calling VSlone again.

FORTRAN

integer function vsflone(file_id, ref_array, max_refs)

integer file_id, ref_array(*), max_refs



[Back to Interface] [Prev] [Next]

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