void SetNetComment_bn ( net_bn*  net,   const char*  comment )

This associates the null terminated C character string comment with net to help document it.

The comment may contain anything, but is usually used to store such things as the origin of the net, its purpose or applicability, background information on the problem domain, a copyright notice, how to use the net, notes for future changes, etc. It is best if the comment consists only of that sort of descriptive information (and as ascii characters), in order to meet expectations in case you share this net with other people or Netica Application. If you wish to attach other data, use SetNetUserField_bn.

Information that pertains only to a particular node should not be placed here, but rather in that node's comment field.

To remove a comment, pass NULL or the empty string for comment.

Netica will make a copy of comment; it won't modify or free the passed string.

Version:

This function is available in all versions.

See also:

GetNetComment_bn    Retrieves value
SetNodeComment_bn    Set a comment for a particular node
SetNetUserField_bn    To attach other types of information, and have it saved to file with the net

Example:

// Put string addon at the end of the existing comment for net
//
const char* origcomment = GetNetComment_bn (net);
int origlength = strlen (origcomment);
char* comment = malloc (origlength + strlen (addon) + 1);
strcpy (comment, origcomment);
strcpy (comment + origlength, addon);
SetNetComment_bn (comment, net);
free (comment);                   // but don't free origcomment