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

Vgettagref/vfgttr

intn Vgettagref(int32 vgroup_id, int32 index, int32 *tag, int32 *ref)
vgroup_id

IN:

Vgroup identifier returned by Vattach

index

IN:

Index of the tag/reference number pair to be retrieved from the vgroup

tag

OUT:

Buffer for the returned tag

ref

OUT:

Buffer for the returned reference number

Purpose

Returns the tag/reference number pair of an HDF object at a given position within a vgroup. Do not confuse this routine with Vgettagrefs.

Return value

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

Description

The input parameter index specifies the position within the vgroup. This routine provides a means of accessing the tag/reference number pairs in a vgroup by specifying the position within the vgroup.

Example

This sample code first uses Vntagrefs to determine the number of tag/reference number pairs in a vgroup. It then uses Vgettagref to extract each tag/ref erence number pair one at a time.


     int32 vgroup_id;  /* pointer to an attached vgroup */
     int32 tag, ref;
     int32 status, i, npairs;

     npairs = Vntagrefs(vgroup_id);
     for (i=0; i < npairs; i++) {
       status = Vgettagref (vgroup_id, i, &tag, &ref);
       printf ("found tag=%d ref=%d at position %d\n", tag, ref, i);
     }
 
FORTRAN

integer function vfgttr(vgroup_id, index, tag, ref)

integer vgroup_id, index

integer tag, ref



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

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