[Enterprise Extensions only]

Syntax for comments in IDL code

IDL supports both C and C++ comment styles. Two slashes (//) start a line comment, which finishes at the end of the current line. A slash and an asterisk (/*) start a block comment that finishes with an asterisk and a slash (*/). Block comments do not nest. The two comment styles can be used interchangeably.

Because comments appearing in an IDL specification can be transferred to the files that the IDL Compiler generates, and because these files are often used as input to a programming language compiler, avoid using characters that are not generally allowed in comments of most programming languages. For example, the C language does not allow an asterisk and a slash (*/) to occur within a comment, so its use is to be avoided, even when using C++ style comments in the IDL file.

IDL also supports throw-away comments. They can appear anywhere in an IDL specification. Throw-away comments start with the string of two slashes and a number sign (//#), and end at the end of the line. Use throw-away comments to comment out portions of an IDL specification.