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

ANfileinfo/affileinfo

intn ANfileinfo(int32 an_id, int32 *n_file_label, int32 *n_file_desc, int32 *n_data_label, int32 *n_data_desc)
an_id

IN:

Multifile annotation interface identifier returned by ANstart

n_file_label

OUT:

Returned number of file labels

n_file_desc

OUT:

Returned number of file descriptions

n_data_label

OUT:

Returned total number of data labels

n_data_desc

OUT:

Returned total number of data descriptions

Purpose

Returns the number of annotations of each type in the current file.

Return value

Returns SUCCEED (or 0) on successful completion or FAIL (or -1) otherwise.

Description

This routine is generally used to find the range of acceptable indices for ANselect calls.

Note that the number of data labels and data descriptions (returned in the n_data_label and n_data_desc parameters) refer to the total number in the file, not the total number for a specific element. Use ANnumann to determine this number for a specific element.

Example

This example illustrates the use of ANfileinfo:

#include "hdf.h"

int32 an_id, file_id, stat;
int32 n_data_label, n_data_desc, n_file_label, n_file_desc;

file_id = Hopen("myfile", DFACC_READ, 0);
an_id = ANstart(file_id);
stat = ANfileinfo(an_id, &n_file_label, &n_file_desc,
			&n_data_label, &n_data_desc);
       ...
stat = ANend(an_id);
Hclose(file_id);
     


 FORTRAN	integer function affileinfo(an_id, n_file_label,

n_file_desc, n_data_label, n_data_desc)

integer an_id, n_file_label, n_file_desc

integer n_data_label, n_data_desc



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

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