How to make multi-line selection in the do-file Stata editor?

Does anyone know how to use the "make selection" function in the do-file Stata editor for code that spans multiple lines? Currently, I cannot find a way to do this without using #delimit; a system that requires a repetition of "demarcation"; at the beginning of every block that I want to run. Any suggestions appreciated!

+3
source share
1 answer

I believe that you are mistaken in understanding the command #delimit ;: this is useful when you encode a do-file to execute it in full subsequently. I also assume that you are using Stata 11, as previous versions behave differently (if I remember well, Stata 10 SE for Mac does not support, for example, comments //and delimitation).

If you are running only part of the code, use ///at the end of the line to continue its command to the next.

Basic example (which will clear all open data, so be careful):

sysuse lifeexp, clear
sc lexp safewater, ///
mlab(country);

, sysuse sc (scatter) . sc mlab ( ) , - ///.

, !

+2

All Articles