Page tree

 

JAVA

FORTRAN

C++

C

 

Link

H5O_SET_COMMENT_BY_NAME

Sets comment for specified object

This function is deprecated in favor of object attributes.

Procedure:

H5O_SET_COMMENT_BY_NAME(loc_id, name, comment, lapl_id)

Signature:

herr_t H5Oset_comment_by_name( hid_t loc_id, const char *name, const char *comment, hid_t lapl_id )

SUBROUTINE h5oset_comment_by_name_f(loc_id, name, comment, hdferr, &
        lapl_id)
    IMPLICIT NONE
    INTEGER(HID_T)  , INTENT(IN)  :: loc_id
    CHARACTER(LEN=*), INTENT(IN)  :: name
    CHARACTER(LEN=*), INTENT(IN)  :: comment
    INTEGER         , INTENT(OUT) :: hdferr
    INTEGER(HID_T)  , INTENT(IN), OPTIONAL :: lapl_id

Parameters:
hid_t loc_idIN: Location identifier; may be a file, group, dataset, named datatype or attribute identifier
const char *name

IN: Name of the object whose comment is to be set or reset, specified as a path relative to loc_id
name can be '.' (a dot) if loc_id fully specifies the object for which the comment is to be set.

const char *comment    IN: The new comment
hid_t lapl_idIN: Link access property list identifier

Description:

H5O_SET_COMMENT_BY_NAME sets the comment for the specified object to the contents of comment. Any previously existing comment is overwritten.

The target object is specified by loc_id and name. 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, any existing 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. Datasets, groups, and committed (named) datatypes have object headers. Symbolic links do not have object headers.

If a comment is being added to an object attribute, this comment will be attached to the object to which the attribute belongs and not to the attribute itself.

lapl_id contains a link access property list identifier. A link access property list can come into play when traversing links to access an object.

Returns:

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

Example:

Coming Soon!

History:
Release    Change
1.8.11Fortran subroutine introduced in this release.
1.8.0Function introduced in this release.

--- Last Modified: April 25, 2019 | 01:30 PM