From d8b497ecefc469762b0e77472687880af895ee8c Mon Sep 17 00:00:00 2001 From: Binh-Minh Ribler Date: Sun, 26 Oct 2003 13:54:07 -0500 Subject: [svn-r7741] Purpose: Fix example Description: On Solaris 64 (Sol), the output has garbage for a dataset when fill value is not set. Solution: Added setting fill value to the dataset first. Platforms: Only effected C++ API Linux 2.4 (eirene) SunOS sol 5.8 (sol) --- c++/examples/extend_ds.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/c++/examples/extend_ds.cpp b/c++/examples/extend_ds.cpp index 34a50c3..c4409db 100644 --- a/c++/examples/extend_ds.cpp +++ b/c++/examples/extend_ds.cpp @@ -72,10 +72,15 @@ int main (void) cparms.setChunk( RANK, chunk_dims ); /* + * Set fill value for the dataset + */ + int fill_val = 0; + cparms.setFillValue( PredType::NATIVE_INT, &fill_val); + + /* * Create a new dataset within the file using cparms * creation properties. */ - DataSet dataset = file.createDataSet( DATASET_NAME, PredType::NATIVE_INT, mspace1, cparms); /* -- cgit v0.12