diff options
author | Elena Pourmal <epourmal@hdfgroup.org> | 1998-02-13 23:00:58 (GMT) |
---|---|---|
committer | Elena Pourmal <epourmal@hdfgroup.org> | 1998-02-13 23:00:58 (GMT) |
commit | 31538e03e0127b98a82391cf65e21db589738e2c (patch) | |
tree | 8a01bfdd90659ed356fbb5a076ba1d145e37b131 /examples/h5_write.c | |
parent | e15281db5c9b46f0f41aecb58767733fd7b5cff3 (diff) | |
download | hdf5-31538e03e0127b98a82391cf65e21db589738e2c.zip hdf5-31538e03e0127b98a82391cf65e21db589738e2c.tar.gz hdf5-31538e03e0127b98a82391cf65e21db589738e2c.tar.bz2 |
[svn-r273] Array datatype and corresponding datatype keyword have been changed
from int and H5T_NATIVE_INT to int32 and H5T_NATIVE_INT32 to show how
to use HDF predefined datatypes.
Diffstat (limited to 'examples/h5_write.c')
-rw-r--r-- | examples/h5_write.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/h5_write.c b/examples/h5_write.c index da73cee..00ac680 100644 --- a/examples/h5_write.c +++ b/examples/h5_write.c @@ -17,7 +17,7 @@ main () hid_t datatype, dataspace; /* handles */ size_t dimsf[2]; /* dataset dimensions */ herr_t status; - int data[NX][NY]; /* data to write */ + int32 data[NX][NY]; /* data to write */ int i, j; /* @@ -51,7 +51,7 @@ dataspace = H5Pcreate_simple(RANK, dimsf, NULL); /* * Define datatype for the data in the file. - * We will store liitle endian INT32 numbers. + * We will store little endian INT32 numbers. */ datatype = H5Tcopy(H5T_NATIVE_INT32); status = H5Tset_order(datatype, H5T_ORDER_LE); @@ -65,7 +65,7 @@ dataset = H5Dcreate(file, DATASETNAME, datatype, dataspace, /* * Write the data to the dataset using default transfer properties. */ -status = H5Dwrite(dataset, H5T_NATIVE_INT, H5P_ALL, H5P_ALL, +status = H5Dwrite(dataset, H5T_NATIVE_INT32, H5P_ALL, H5P_ALL, H5C_DEFAULT, data); /* |