Statalisters
Background:
Stata version 8 gives us greatly increased flexibility, particularly in
regards to graph commands. A cost of this flexibility is that the
commands are much more complicated and much longer. These commands
would be much easier to read if they could be written on multiple lines
with the user controlling the line breaks.
Stata allows such control in do files through the #delimit command,
which replaces the enter key by the semicolon as the command delimiter.
This works well for disciplined experienced programmers. It works
poorly for inexperienced users whose computing experience is largely of
the point and click variety; it does not solve the problem of
interactive command entry. (I have found that trying to teach SAS to
clinicians is a disaster, in large part because of the difficulty they
experienced remembering to correctly delimit their commands with
semicolons.) In my opinion, reserving the enter key to indicate the
execution of the current command is very important for inexperienced
users.
Suggestion:
Stata output already uses a right pointed bracket (>) in column 1 to
indicate the continuation of the command from the previous line. Would
it be desirable to make the <alt>Enter key break the command in the
Stata Command window and enter a ">" as the first character of the new
line. This would allow users to enter nicely formatted multiline
commands in the command window while preserving the Enter key to mean
"execute the current command". For example, the command
twoway (scatter glyco ph, msymbol(circle_hollow) ) (line yhat ph),
ylabel(0(50)300) xlabel( 6.9(.1)7.5) ytitle(Plasma Gycolate (mg/dl))
might be reformatted as
twoway (scatter glyco ph, msymbol(circle_hollow) )
> (line yhat ph)
> , ylabel(0(50)300) xlabel( 6.9(.1)7.5) ytitle(Plasma Gycolate
(mg/dl))
A ">" character at the beginning of a line in a do file could then be
allowed to indicate that the current line was a continuation of the
preceding one. This would unify the syntax of Stata output with Stata
input from both the Stata Command window and from do files.
Questions:
Would this addition be of use to the Stata community?
Would it be very difficult for Stata to implement?
Have I overlooked anything in the manuals that is equivalent to this
suggestion?
Bill Dupont
William D. Dupont phone: 615-322-2001 URL
http://www.mc.vanderbilt.edu/prevmed/facstaff/dupont.htm
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/