help comments
-------------------------------------------------------------------------------
Title
[P] comments -- Add comments to programs
Description
There are several ways of adding comments in do-files and programs
(ado-files).
1. begin the line with *
2. place the comment between /* and */ delimiters
3. begin the comment with //
4. begin the comment with ///
The comment indicator * may be used only at the beginning of a line, but
it does have the advantage that it can be used interactively. *
indicates that the line is to be ignored. The * comment indicator may
not be used within mata.
The /* and */ comment delimiter has the advantage that it may be used in
the middle of a line, but it is more cumbersome to type than the other
comment indicators. What appears inside /* */ is ignored.
The // comment indicator may be used at the beginning or at the end of a
line. However, if the // indicator is at the end of a line, it must be
preceded by one or more blanks. // indicates that the rest of the line
is to be ignored.
The /// comment indicator instructs Stata to view from /// to the end of
a line as a comment and to join the next line with the current line. ///
is one way to make long lines more readable. Like the // comment
indicator, the /// indicator must be preceded by one or more blanks.
Also see
Manual: [P] comments
Help: [P] #delimit