Currently in h5ltget_attribute_info_f, if the attribute is a character
string then type_size will include the NULL termination in the size.
The user will have to adjust the size appropriately.
In general, the Fortran wrappers should return a string with the null
character removed and return a string's length/size that do not
include the null character. For this HL API, that is not the case.
Quoting Zaak Beekman <[email protected]>:
What is the current and the correct behaviour of
h5ltget_attribute_info_f regarding
the type_size dummy argument when the attribute is a character string?
The Fortran binding should probably decrement type_size by the appropriate
amount to account for the missing null character. Then users can query
their system the length in bytes of the native sharacter type (of length 1)
and then divide the # of bytes returned in type_size by the number of bytes
in a length 1 native string. (i.e. to use with allocatable scalar character
variables.) Does this sound reasonable/true?
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org