[Top] [Prev] [Next] [Bottom]
DFSDsetdimstrs/dssdist
intn DFSDsetdimstrs(intn dim, char *label, char *unit, char *format)
Purpose
|
Sets the label, unit, and format strings corresponding to the specified dimension.
|
Return value
|
Returns SUCCEED (or 0) if successful and FAIL (or -1) otherwise.
|
Description
|
In both Fortran-77 and C programs, dim = 1 for the first dimension, and dim = 2 for the second dimension. If the user is not interested in one or more strings, empty strings can be used as parameters for the DFSDsetdimstrs call. For example, DFSDsetdimstrs(1, "vertical", " ", " ") will set the label for the first dimension to "vertical" and set the unit and format to empty strings.
|
Example
|
In this example a 200 x 300 data array is written to a file called 'myfile.hdf', together with label, unit, and format information about each dimension.
|
float32 press1[200][300];
int dims[0], dims[2];
...
dims[0] = 200;
dims[1] = 300;
DFSDsetdims(2, dims);
DFSDsetdimstrs(1, "vertical", "cm", "F10.2");
DFSDsetdimstrs(2, "horizontal", "m", "F10.3");
DFSDadddata(myfile.hdf', 2, dims, press1);
[Top] [Prev] [Next] [Bottom]
hdfhelp@ncsa.uiuc.edu
HDF User's Reference Manual, Draft 06/09/97, NCSA HDF
Development Group.