It is good programming practice to include comments in your Cicode files. Comments allow you to quickly understand how a function works next time you (or another designer) need to modify it.
The Cicode compiler recognizes the following single line, C style, and C++ style comments:
! A single line comment
WHILE DevNext ( hDev ) DO
Counter = Counter + 1 ; ! An in-line comment
/* A block comment is a C-style comment, and can
extend over several lines. Block comments need to
finish with a delimiter, but delimiters at the
start of each line are optional only. */
// A double-slash comment is a C++ style comment, for example:
Variable = 42; // This is a comment
Single line ( ! ) and C++ style ( // ) comments can have a line of their own, where they refer to the block of statements either before or after it. It is good practice to set a convention for these comments. These comments can also be on the same line as a statement, to explain that statement only. Any characters after the ! or // (until the end of the line) are ignored by the compiler.
Block (C style) comments begin with /* and end with */. These C style comments need no punctuation between the delimiters.