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

ANselect/afselect

int32 ANselect(int32 an_id, int32 index, int32 annot_type)
an_id

IN:

Multifile annotation interface identifier returned by ANstart

index

IN:

Location of the annotation in the file

annot_type

IN:

Annotation type

Purpose

Selects and returns the identifier for the annotation identified by the index index and the annotation type annot_type.

Return value

Returns the identifier of the selected annotation.

Description

The identifier returned by ANselect can refer to either a label or a description. The index supplied by the parameter index is zero-based.

Valid values for the annot_type parameter are:

AN_DATA_LABEL - for data labels
AN_DATA_DESC - for data descriptions
AN_DATA_LABEL - for data labels
AN_DATA_DESC - for data descriptions
Example

This example illustrates the use of ANselect in returning the fourth file label in a file:

#include "hdf.h"

int32 an_id, ann_id, file_id, stat;
ann_type annot_type = AN_FILE_LABEL;
int32 index = 4;

file_id = Hopen("myfile", DFACC_READ, 0);
an_id = ANstart(file_id);
ann_id = ANselect(an_id, index, annot_type);
       ...
stat = ANendaccess(ann_id);
stat = ANend(an_id);
Hclose(file_id);
     

 FORTRAN	integer function afselect(an_id, index, annot_type)

integer an_id, index

integer annot_type



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

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