summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/h5_extend_write.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/examples/h5_extend_write.c b/examples/h5_extend_write.c
index fca6ebc..60521cd 100644
--- a/examples/h5_extend_write.c
+++ b/examples/h5_extend_write.c
@@ -86,7 +86,7 @@ status = H5Dwrite(dataset, H5T_NATIVE_INT, dataspace, filespace,
H5C_DEFAULT, data1);
/*
- * Extend the dataset. Dataset becomes 7 x 3.
+ * Extend the dataset. Dataset becomes 10 x 3.
*/
dims[0] = dims1[0] + dims2[0];
size[0] = dims[0];
@@ -113,7 +113,7 @@ status = H5Dwrite(dataset, H5T_NATIVE_INT, dataspace, filespace,
H5C_DEFAULT, data2);
/*
- * Extend the dataset. Dataset becomes 7 x 5.
+ * Extend the dataset. Dataset becomes 10 x 5.
*/
dims[1] = dims1[1] + dims3[1];
size[0] = dims[0];
@@ -140,6 +140,20 @@ status = H5Dwrite(dataset, H5T_NATIVE_INT, dataspace, filespace,
H5C_DEFAULT, data3);
/*
+ * Resulting dataset
+ *
+ 3 3 3 2 2
+ 3 3 3 2 2
+ 3 3 3 0 0
+ 2 0 0 0 0
+ 2 0 0 0 0
+ 2 0 0 0 0
+ 2 0 0 0 0
+ 2 0 0 0 0
+ 2 0 0 0 0
+ 2 0 0 0 0
+ */
+/*
* Close/release resources.
*/
H5Dclose(dataset);