Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: possible bug in the -syntax- command?


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: possible bug in the -syntax- command?
Date   Wed, 10 Jan 2007 11:32:49 -0000

I guess that you are trying something a little nonstandard
given the special treatment of options whose names begin with 
"no", which is documented. 

I doubt very much that there is a bug, just a 
misunderstanding by Stata! 

I suspect that your problems would diminish if 
you changed "ADJust" to "ADJust2". You need not 
-- indeed should not -- show that extra "2" to users
in the help, but it would distinguish the options
to -syntax-. 

A related issue is discussed at 
http://www.stata.com/support/faqs/lang/syntax.html

Nick 
[email protected] 

Zurab Sajaia
 
> I encountered somewhat strange behavior of -syntax- command and was
> wandering if it's my fault or there is a problem indeed.
> Lets consider this simple program:
> 
> capture program drop test
> program define test
>     syntax [, NOADJust ADJust]
> 
>     display "`noadjust'"
>     display "`adjust'"
> end
> 
> test , noadjust
> //
> it works as expected, but if I change the order of options 
> "syntax [, ADJust
> NOADJust]" then `adjust' local contains the value of option but local
> `noadjust' is always empty.
> 
> Any ideas why it might happen?

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