This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Hi Dan, I'm just starting to look over the changes you sent me for the netCDF C++ interface, and have a couple of questions about changes to ncvalues.hh. 1. In the statement #define ncBad_int ncBad_short I think this should be #define ncBad_int ncBad_long instead, because "ncInt" is intended to be synonymous with "ncLong" rather than with "ncShort". 2. In ncvalues.hh, you defined a new member function NcVal::invalid(), but the definition you provided makes it appear that either the name should be "valid" or the return values should be changed: int NcVal(TYPE)::invalid( void ) const \ { \ for(int i=0;i<the_number;i++) \ if (the_values[i] == ncBad_ ## TYPE) return 0; \ return 1; \ } \ As I read it, this returns 0 if a bad (invalid) value was detected in the block of values and 1 if none of the values was bad. If the return value is being treated as a boolean, shouldn't this be the other way around? --Russ