Stata has two types of single-line comments: // and *. The comment // has identical syntax to single-line comments used by, e.g., C and R. However, while * can be placed anywhere on a line, it cannot be placed after code. For example:
I am aware of some languages, like Fortran, that require comments at a certain place in the column. Are there examples of other languages that have a single-line comment syntax like Stata's *, which can be placed anywhere on the line but not after code?
Code:
* This is a valid comment * This is a valid comment gen var = 3 * This is not a valid comment gen var = 3 // But this is a valid comment
Comment