[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: [programming] using -if- in do file
> -----Original Message-----
> From: FEIVESON, ALAN H. (AL) (JSC-SD) (NASA)
> Sent: Thursday, December 12, 2002 10:51 AM
> To: 'statalist'
> Subject: st: [programming] using -if- in do file
> Hello - Is there a way to restrict observations over which a do-file
> operates without using the -syntax- command? The syntax
> command allows [if]
> and [in] options, but is extremely picky about using numbers
> or non existent
> variable names in the argument list. Therefore I'd rather
> check for the -if-
> condition directly. I assume there must be some system macro
> which stores
> the -if- or -in- condition. How can I get it without using -syntax- ?
I assume you mean to say "ado-file", not "do-file".
My approach, if you want the if/in and/or options parsing capability of
syntax, would be to use the "anything" argument of -syntax-, which
allows an arbitrary set of stuff where the varlist would normally go.
syntax anything [if] [in] , OPtion(string)
See -help syntax-
* For searches and help try: