Is it at all possible to add a dialog box to this? The request could easily
go overlooked...
Martin Weiss
_________________________________________________________________
Diplom-Kaufmann Martin Weiss
Mohlstrasse 36
Room 415
72074 Tuebingen
Germany
Fon: 0049-7071-2978184
Home: http://www.wiwi.uni-tuebingen.de/cms/index.php?id=1130
Publications: http://www.wiwi.uni-tuebingen.de/cms/index.php?id=1131
SSRN: http://papers.ssrn.com/sol3/cf_dev/AbsByAuth.cfm?per_id=669945
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Nick Cox
Sent: Thursday, June 26, 2008 3:53 PM
To: [email protected]
Subject: st: RE: user input as scalar value
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.
See -help display-.
I'd rather take arguments from the command line, but that's a matter of
taste.
Nick
[email protected]
Rajesh Tharyan
I have a do file, wherein I have a few scalars which I am using to
expand,
loop , as cutoff limits etc. Is it possible to have the do file
prompt the user to input the value of the scalar, so that I do not have
to
make the changes to the do file.
Suppose I had a do file like
Scalar a=5
......
Expand a
.......
Can I get stata to prompt the user like
Enter the value for expansion :
that input then gets stored as a
The code executes..
*
* 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/
*
* 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/