Adding Comments in Data Files

About Adding Comments in Data Files

You can add comments in a data file by using:

  • Comment pair, / *...*/

  • Single line comment delimiter, //

The topics covered in this section are:

Using /*...*/ for Comments

The characters "/*" in the comment pair indicate the beginning of a comment. The file parser treats everything that is present between the "/*" and a matching "*/" as the comment.

Guidelines

These are the guidelines for adding comments in a data file using the "/*...*/" comment pair:

  • You can place a comment pair on separate lines in a transaction block.

  • Comments can span multiple lines.

  • Do not nest comment pairs.

  • Do not include white space between the two characters of a delimiter.

  • If the comment pair appears inside a character constant or a string constant, the tool treats the text as part of the constant.

  • Do not put a comment pair between the unit and the equal sign (=) for a given field, otherwise, the tool treats the comment as part of the unit code.

This example shows comments that have the "/*...*/" comment pair:

/* Insert a data object.
Give only values that are known */
InsertRandom e_10560_class {/* this is the amplifier class
*/
e_prd_ext_code = "RYT 901 6013/2";
e_prd_internal_code@EXT = "RYT 901 6013/2";
e_prd_value_grp = "3";
e_prd_status = "PR";
}

Using // for Comments

The characters "//" indicate the start of a comment that terminates at the end of the line on which it occurs.

Guidelines

These are the guidelines for adding comments in a data file using the "//" characters:

  • You can enter the comment after a transaction line or on a line by itself.

  • Do not include white space between the two characters of a delimiter.

  • If the comment delimiter appears inside a character constant or a string constant, the tool treats the text as part of the constant.

  • Do not put a comment pair between the unit and the equal sign (=), otherwise, the tool treats the comment as part of the unit code.

This example shows the comments that are added to a data file using the "//" comment delimiter:

// Insert a data object.
// Give only values that are known.
InsertRandom e_10560_class {// this is the amplifier class
e_prd_ext_code = "RYT 901 6013/2";
e_prd_internal_code@EXT = "RYT 901 6013/2";
e_prd_value_grp = "3";
e_prd_status = "PR";
}