|
ann_id
|
IN:
|
Annotation identifier returned by ANcreate, ANcreatef or ANselect
|
|
textbuf
|
OUT:
|
Buffer for the returned annotation text
|
|
textbuf_length
|
IN:
|
Length, in bytes, of textbuf
|
#include "hdf.h"
int32 an_id, ann_id, file_id, stat;
int32 index = 0;
char textbuf[20];
ann_type annot_type = AN_FILE_DESC;
file_id = Hopen("myfile", DFACC_READ, 0);
an_id = ANstart(file_id);
ann_id = ANselect(an_id, index, annot_type);
...
/* Read a 17 character annotation text string, */
/* plus a null termination cha */
stat = ANreadann(ann_id, textbuf, 18);
...
stat = ANendaccess(ann_id);
stat = ANend(an_id);
Hclose(file_id);
FORTRAN integer function afreadann(ann_id, buf, buf_length)
integer ann_id, buf_length
character* (*) buf