HDF News Bulletin 09/29/05 In this message, the HDF group wants to conduct a survey of users' preference on how to handle data overflow when converting data of certain integer type to an unsigned integer type. During the development of the data conversion, the HDF5 library has adopted its own ways to handle overflow and underflow when the original values cannot be represented by the destination. These methods adopted by the HDF5 library can be different from the C language standard. For some data conversions, the C language standard does not define the way to handle overflow or underflow. But for some other conversions, it clearly states what values should be assigned to the destination. In the data conversion routines of the HDF5 library, the only significant difference from the C standard is converting an integer, either signed or unsigned, to an unsigned integer. In this case, the library assigns the maximal value to the destination when overflow happens. If the source is a negative value, the value 0 is assigned to the destination. However, the ISO 9899 standard, the Programming Language C, says, "When a value with integer type is converted to another type other than _Bool, if the value can be represented by the new type, it is unchanged. Otherwise, if the new type is unsigned, the value is converted by repeatedly adding or subtracting one more than the maximum value that can be represented in the new type until the value is in the range of the new type." (6.3.1.3 Signed and unsigned type.) Therefore, we want to know whether our users can accept this difference. Three options are listed below for you to choose, 1. Leave the library as it is. 2. Change the library according the C standard. The library's behavior will be different from before. 3. Offer the option of C standard overflow. We can provide an exception handling function when this kind of overflow happens. In this exception handling function, the C standard value will be assigned to the destination. Users can register or un-register this exception handling function. Please let us know your preference of these choices or your other opinions. Raymond Lu HDF5 Development Team