Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: minor bug in -lookfor-?


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: minor bug in -lookfor-?
Date   Mon, 26 Jan 2009 21:51:42 -0000

I've got to say that I don't regard this as a bug. 

-lookfor- does not claim to support options, nor does it do that. So,
there's no inconsistency either way in that respect. 

Nor do I think that there is a good reason to ban commas as input, if
that were to be suggested. Commas can be part of strings, no question. 

As -lookfor- behaves reasonably even when Jeph treats it not quite as
intended, wherein lies the bug? 

Nick 
[email protected] 

Jeph Herrin

For what it's worth, I was surprised to discover that

  lookfor myvar, fullnames

produces the same result as

  lookfor myvar fullnames

That is, if you add any options to -lookfor-, it ignores the
comma and treats the options as search strings.

On the one hand, the documentation clearly indicates there
are no options. On the other, it often happens that I try
options that I think might work and expect Stata complain
if they are invalid.

In this case, I abbreviated -fullnames- to -fu-, and was finding 
variables that in no way matched -myvar-. Took me a while to
puzzle out.

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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