No, you don't have to do it this way. You can peel off
the leading tokens with -gettoken- _before_ using a -syntax-
statement on the remainder. But given the rest
of your design, I would probably go with -anything-
and then -tokenize- thr result of that.
Nick
[email protected]
Jun Xu
> I am trying to write a test command like:
>
> mytest a=1 b=2 [if] [in], options // something like that
>
> I checked out the syntax for "syntax", but could not find any
> template for
> the command above. Do I have to first parse a=1 b=2 by using
> somthing like
>
> syntax anything [if] [in]
>
> and then use either tokenize or gettoken to parse or is ther
> an easy way
> out? I would like easiy get locals containing a, 1, b, 2.
*
* 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/