Nick Cox wrote:
Yes, you can do this.
A canonical exchange within the do file is
di "Enter value for foo: " _request(foo)
after which local foo contains the value typed.
--------------------------------------------------------------------------------
Just a technical clarification: it's returned in a global macro and not a
local macro. (I *have* happened to have used it on rare occasion, and have
got stung nearly each time for forgetting this.)
Joseph Coveney
. display in smcl as input "Enter value for foo: " _request(foo)
Enter value for foo: . Bar
. display in smcl as text "local " as result "`foo'"
local
. display in smcl as text "global " as result "$foo"
global Bar
. exit
end of do-file
*
* 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/