Dear Statalist community,
As documented in the help, the asterisk (*) "indicates that the line is to be ignored." Until very recently, I never encountered any exception to this rule. However, somewhat surprisingly, the obliterating capacity of the asterisk seems to spare multiline comments. The following code illustrates what I mean:
Is this a bug or a feature in Stata? Intuitively, I see no reason why multiline comments should be exempted from the obliterating effect of asterisk comments. If this is by design, are there any other commands that escape the scope of asterisk comments?
I am using Stata 17 on Windows 10.
As documented in the help, the asterisk (*) "indicates that the line is to be ignored." Until very recently, I never encountered any exception to this rule. However, somewhat surprisingly, the obliterating capacity of the asterisk seems to spare multiline comments. The following code illustrates what I mean:
Code:
sysuse auto.dta, clear * I would expect the following two commands to execute, even if I type: /// sum price sum weight * However, only "sum weight" is executed (i.e. the multine comment is in effect) * The effect of /// remains, even if the characters occur somewhere in the middle sum price sum weight * Again, only "sum weight" is executed * The effect of /// disappears when a blank line is inserted sum price sum weight * Finally, both "sum price" and "sum weight" are executed * Similarly, the asterisk does not deactivate the opening comment /* sum price sum weight These commands are not executed, although Stata's do-file editor does not flag them as comments.
I am using Stata 17 on Windows 10.
Comment