Page tree

 

JAVA

FORTRAN

C++

C

 

Link

H5G_SET_COMMENT

Sets comment for specified object

This function is deprecated in favor of the function H5O_SET_COMMENT.

Procedure:

H5G_SET_COMMENT(loc_id, name, comment)

Signature:

herr_t H5Gset_comment(hid_t loc_id, const char *name, const char *comment )

SUBROUTINE h5gset_comment_f(loc_id, name, comment, hdferr)
  IMPLICIT NONE
  INTEGER(HID_T), INTENT(IN) :: loc_id      ! File, group, dataset, or 
                                            ! named datatype identifier
  CHARACTER(LEN=*), INTENT(IN) :: name      ! Name of object 
  CHARACTER(LEN=*), INTENT(IN) :: comment   ! Comment for the object 
  INTEGER, INTENT(OUT) :: hdferr            ! Error code 
                                            ! 0 on success and -1 on failure
END SUBROUTINE h5gset_comment_f

Parameters:
hid_t loc_idIN: Identifier of the file, group, dataset, or named datatype
const char *nameIN: Name of the object whose comment is to be set or reset
name must be '.' (dot) if loc_id fully specifies the object for which the comment is to be set.
const char *comment    IN: The new comment

Description:

H5G_SET_COMMENT sets the comment for the object specified by loc_id and name to comment. Any previously existing comment is overwritten.

loc_id can specify any object in the file. name can be one of the following: 
  — The name of the object relative to loc_id 
  — An absolute name of the object, starting from /, the file’s root group 
  — A dot (.), if loc_id fully specifies the object

If comment is the empty string or a null pointer, the comment message is removed from the object.

Comments should be relatively short, null-terminated, ASCII strings.

Comments can be attached to any object that has an object header, e.g., datasets, groups, and named datatypes, but not symbolic links.

Returns:

Returns a non-negative value if successful; otherwise returns a negative value.

Example:

Coming soon!

 

History:
Release    Change
1.8.0Function deprecated in this release.

--- Last Modified: April 25, 2019 | 11:48 AM