Getting Information


Contents:



How to Get Information

To obtain information regarding SDSs in a file you can use the following functions:

Sample Program

The following sample program shows how you might get information regarding SDSs in a file (You can either download the C or FORTRAN program at the end, or just take a look at the HTML version with the HDF calls highlighted): If you have downloaded this program, then you can compile and run it. It goes through every dataset in an HDF file, and prints out the name, rank and number of attributes in the file.

Following is a detailed review of what this program does:


Output from Sample Program

Following is what this program outputs to the screen:
 ... sd.hdf opened for READ access.
 name = data1                                                           
 rank =   2
 number of attributes =   0
 ... file closed

Download Sample Program (optional)

Programs used in this tutorial: [Compiling a program]