| From | David Kantor <[email protected]> |
| To | [email protected] |
| Subject | Re: st: RE: syntax; option real & varname |
| Date | Thu, 15 Aug 2002 10:09:30 -0400 |
[...]
I would get x1 as a string, and then test it after your syntax line:
syntax , x1(string)
capture confirm new variable `x1'
if _rc {
confirm number `x1'
if _rc {
di as error "x1() must be a new variable name or a number"
error 198
}
else {
local isvar 0
}
}
else {
local isvar 1
}
[...]
David Kantor Institute for Policy Studies Johns Hopkins University [email protected] 410-516-5404 * * 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/
| © Copyright 1996–2025 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |