Comments
Any serious programmer will say you that a good program is a commented program.
Comments are destinated to the reader only and are ignored by the compiler.
To add a comment, use the ` symbol.
` this is a full line comment
print x ` this is a comment at end of line A such comment can't be followed by any statement. The compiler recognizes also the C++ symbol: //
// this is a one-line comment as in C++. A multi-line comment begins with /* and ends with */
Example:
/* inside these markers, anything is ignored by the compiler */
Comments are not kept into the target language. You can make them persistent by doubling the symbol ` in this manner:
`` this is a persistent comment
The compiler could recognize code following the end of a such comment, but this is just not good programming style!
Persistency
Comments defining by these codes:
`
//
/* */
are not kept into the generated target code, neither Php nor C++.
For a comment to be kept, the comment symbol must be doubled:
``
Examples of comments. | int x = 10 `
not persistent comment print x `` persistent comment |
C++ generated code: | int x = 10; cout << x << "\n"; `` persistent comment |