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

Re: st: Stata 6 vs. 7


From   Hung-Jen Wang <[email protected]>
To   [email protected]
Subject   Re: st: Stata 6 vs. 7
Date   Wed, 11 Sep 2002 01:47:39 +0800

Hi Nick,

Tuesday, September 10, 2002, Nick 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.

HJW

*
*   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/



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