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/