An IDL file is made more readable by the use of comments. Several comment styles are supported by IDL, as shown in the following figure:

/***************************************/
/* This is a comment that will appear  */
/* in the language binding files.      */
/***************************************/

/*
 * This is a comment that will appear
 * in the language binding files.
 */

// This is a comment that will appear
// in the language binding files.

//# This is a comment that will not appear
//# in the language binding files.

Because IDL files are used to generate language bindings, comments must be strictly associated with particular elements so that they appear at the appropriate points in the output files. If comments are not placed as prescribed by the IDL syntax, they might not appear where you expect to see them.

Comments beginning with //# do not appear in any binding files. They can be placed anywhere in an IDL file. They can be used to comment out sections of an IDL file or to add historical or notational commentary.


[Back] [Next]