[netcdf-hdf] goofy question: can you guarantee that you will not use an hid_t with a value of zero?

NOTE: The netcdf-hdf mailing list is no longer active. The list archives are made available for historical reasons.

Howdy HDF5 Programmers!

The common view holds "there is no such thing as a stupid question."

I have personally found this to be profoundly untrue. *Most* questions
are stupid. Including (even especially) my own. And here is another
one to add to the total:

Can you guarantee that you will not us a zero as a valid hid_t?

In your H5Fcreate docs, for example, you say:

  Returns:
      Returns a file identifier if successful; otherwise returns a
      negative value.

But what about zero? According to this definition, zero would be a
valid file ID, and might be returned by H5Fcreate. 

Is this intentional? Or did you just forget to write that all IDs will
be greater than zero?

As you know, there are many conveniences associated with zero in C,
but I cannot use them in the case of HDF5 IDs, because I have to worry
that zero might be a valid value. So a little clarification of your
documentation would allow me to clean up my code a bit.

Thanks!

Ed
 

-- 
Ed Hartnett  -- ed@xxxxxxxxxxxxxxxx


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