Re: Conventions

Harvey,

> ...
> Regarding valid_range.  The generic conventions clearly state that
> the type must match that of the variable.  If if does not, then
> there should be an error message. ...

One reason the issue of the type of valid_range keeps coming up is
byte data type and the question of how to represent whether bytes are
to be interpreted as signed or unsigned data.  An exception in the
case of bytes is specifically allowed in the Users Guide documentation
for valid_range:

    ... The type of each valid_range, valid_min and valid_max
    attribute should match the type of its variable (except that for
    byte data, these can be of a signed integral type to specify the
    intended range).

The problem is that you can't have valid_range be of the same type as
the variable (byte), because then it won't be able to represent values
in the entire range from the minimum signed byte (-128) to the
maximum unsigned byte (255), needed to represent whether the values
are intended to be interpreted as signed or unsigned.

--Russ

  • 2002 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: