******************** * Stata Comments * ******************** //Three ways to write comments in stata /* 1. Double Forward Slash 2. Asterisk 3. Forward Slash and Asterisk */ //1. Double Forward Slash //can be used at the begining of line or a the end of line //any thing appearing after double forward slashes will not be executed as command sysuse auto,clear //This command will load auto dataset sysuse auto //,clear //Now clear option will not be executed //Must have a space between command and forward slashes sysuse auto,clear//Wrong way of doing it. *2. Asterisk *A single asterisk at the begining of a line will turn the line to a comments *can only be used at the begning of line not at the end of in the middle *can be used intereactively *sysuse auto,clear sysuse auto,clear *this asterisk sign wont work /*3. Forward slash and asterisk Any thing between "/*" and "*/" will be considered comments sysuse auto,clear The above command will not be executed */ sysuse auto /*,clear like double forward slashes in can be used at begining, middle or end of line. Usually they are used to comment out long line of code or comments */ sysuse auto /*middle*/,clear ********************** *Line Breaks * ********************** //Three forward slashes //only in do file not intereactively regress price mpg rep78 headroom trunk weight lengt turn displacement gear_ratio //Using delimit instead of forward slashes #delimit ; regress price mpg rep78 headroom trunk weight lengt turn displacement gear_ratio; #delimit cr.