Comments
There are 3 basic types of comments
- Single Line - The entire line is a comment
- Rest of the line - Everything after the delimiter is a comment
- Block - Everything between 2 delimiters is a comment.
Normally, these can extend over several lines.
| C++
| Pascal
| Basic
|
---|
Rest of line
| //
//
' (apostrophy)
Block
| /* .. */
{ .. } (* .. *)
None Available
| | | | | |
Notice that the Pascal curly brace block comment delimiters are the
same as the C++ code block delimiters.
The Pascal // and (* .. *) delimiters are from the Delphi help
and may be compiler dependent.
Notes on Other Languages:
The languages covered here do not limit users to Single Line comments.
In DOS batch files (and command.sys), any line which starts with rem
is considered a comment. Also, in batch files, any line which starts with
a colon - : - is an unexecuted label ... effectively
making it a comment.
In HTML, any unknown tag is treated as a comment.
Many people use
as a simple comment.
However, this type of comment can not include regular tags (commands)
which end with the greater than symbol.
The block comment of
can include regular HTML tags.
Author: Robert Clemenzi -
clemenzi@cpcug.org