Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Parse multiple test equalities

From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Parse multiple test equalities
Date   Wed, 31 Mar 2004 21:50:44 +0100

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.  

[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:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index