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

VSattach/vsfatch

int32 VSattach(int32 file_id, int32 vdata_ref, char *access)
file_id

IN:

File identifier returned by Hopen

vdata_ref

IN:

Reference number for the vdata to open

access

IN:

Access mode

Purpose

Attaches to an existing vdata or creates a new vdata with the specified reference number and returns an identifier to that vdata.

Return value

Returns a vdata identifier if successful and FAIL (or -1) otherwise.

Description

VSattach returns an identifier to the vdata, through which all further operations on that vdata are carried out. See also VSdetach.

Valid values for access are: "r" for read access and "w" for write access.

If access is "r", then vdata_ref must be a valid reference number of an existing vdata returned from any of the vdata search routines (e.g., Vgetnext or VSgetid). It is an error to attach to an vdata with a vdata_ref of 1 with "r" access.

If access is "w", then vdata_ref must be the valid reference number of an existing vdata. An existing vdata is generally attached with "w" access to replace part of its data, or to appended new data to it. The parameter vdata_ref may also be -1; this is used to create a new (empty) vdata. The default interlace for a new vdata is FULL_INTERLACE. This may be changed using VSsetinterlace.

An existing vdata may be multiply attached for reads, but only one attach with write access to a vdata is allowed.

FORTRAN

integer function vsfatch(file_id, vdata_ref, access)

integer file_id, vdata_ref

character*1 access



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

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