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

ANwriteann/afwriteann

intn ANwriteann(int32 ann_id, char* label, int32 ann_length)
ann_id

IN:

Annotation identifier returned by ANcreate, ANcreatef or ANselect

label

IN:

Text to be written to the annotation

ann_length

IN:

Length, in bytes, of the annotation text pointed to by label

Purpose

Writes an annotation to the current HDF file.

Return value

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

Description

ANwriteann will overwrite any preexisting annotation containing the text identified by label.

Example

This example illustrates the use of ANwriteann:

#include "hdf.h"

int32 an_id, stat;
char *label = "This is annotation text.";

file_id = Hopen("myfile", DFACC_WRITE, 0);
an_id = ANstart(file_id);
ann_id = ANcreate(an_id, tag, ref, type);
       ...
stat = ANwriteann(ann_id, label, sizeof(label));
       ...
stat = ANendaccess(ann_id);
stat = ANend(an_id);
Hclose(file_id); 
FORTRAN

integer function afwriteann(ann_id, label, ann_length)

integer ann_id, ann_length

character* (*) label



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

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