11/15/2022 0 Comments New in stata 13Like double forward slash, they can be used at the beginning, middle or end of a line. sysuse auto /*, clear The clear option is commented out, as is this line. This commenting style can be used in the beginning, middle or end of a command or line. sysuse auto, clear The command above is part of the comment and will not be executed. *This is the first line of this comment. You can therefore comment out multiple lines of text or code as one comment. Not only that, this style of commenting also allows you to take your comment to a new line. A Forward Slash and an AsteriskĪny text encased between a forward slash and asterisk will be treated as a comment. *This is a comment that can be entered through Stata’s command box or the do file. Comments with double forward slash cannot be executed from the command box. sysuse auto, clear *This is an incorrectly written comment and will return an error.Īsterisk comments can be used interactively, which means they can be written directly in Stata’s command box and displayed in the Result window. You cannot add them in front of a command like we used the double forward slash. AsteriskĪsterisks provide limited commenting capability in that they only work if added at the very beginning of a line. The correct way to write the above is: sysuse auto, clear //This is a comment correctly added. The following is the wrong way to use the double forward slash: sysuse auto, clear//This is a comment incorrectly added. sysuse auto //, clearĪlways add a space before the double forward slash, otherwise Stata treats them as part of the command and attempts to (unsuccessfully) execute them. For example, in the following example, the option of clear is commented out and will not be executed. This can also be used to comment out actual Stata commands.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |