> capture syntax , x1(real)
> if _rc {
> capture syntax, x1(varname numeric)
> }
> if _rc {
> di as err "x1() should specify real number or numeric variable"
> exit 198
> }
>
> In short, if one -syntax- doesn't fit, the other one must.
Very spiffy solution. One potential problem, though, is that there
could be some other problem in the syntax typed by the user, in which
case the error message would not be informative. NOt a big problem,
probably, unless the true syntax options are a bit more complex than the
example here.
Nick Winter
>
*
* 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/