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

Re: st: Stata 6 vs. 7


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   Re: st: Stata 6 vs. 7
Date   Tue, 10 Sep 2002 19:11:02 +0100

Hung-Jen Wang <hjwang@econ.sinica.edu.tw>

> Tuesday, September 10, 2002, Nick [Cox] wrote:

> To echo and expand on my earlier posting in this thread,

> program def myexpl
>         version 6
>         syntax [ , myopt(str) ]

>         if trim("`myopt'") != "" {
>                 unab myopt : `myopt'
>         }
>         else local myopt

> Nick

> If -myopt- is desired to be empty (which is the source of this
problem),
> the above program does not work with Stata 6 executable. It is
because
> Stata 6 does not accept empty (either "()" or "( )") as a valid
> "string" for -myopt-, therefore spitting out the message
> "myopt() invalid" when encounters. It seems the only way around is
to
> use "passthru" instead of string or varlist as the option value
type, as
> suggested by Weihua Guan.

OK, but you've got me lost in these subtleties. 

As I see it, if you want -myopt()- to be empty, you don't 
need to invoke it. That is easy enough, interactively 
and also in some wider program. 

What's the complication forbidding that? 

Nick 
n.j.cox@durham.ac.uk 

<<attachment: winmail.dat>>




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