From 31538e03e0127b98a82391cf65e21db589738e2c Mon Sep 17 00:00:00 2001 From: Elena Pourmal Date: Fri, 13 Feb 1998 18:00:58 -0500 Subject: [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. --- examples/h5_write.c | 6 +++--- 1 file 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); /* -- cgit v0.12