Statalist The Stata Listserver


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

Re: st: Re: st: why is lookfor acting up?


From   Anna G <[email protected]>
To   [email protected]
Subject   Re: st: Re: st: why is lookfor acting up?
Date   Sat, 15 Jul 2006 04:49:24 -0700 (PDT)

Richard,
thank you for your prompt reply.
I use intercooled stata 8.0 (at home)
. which lookfor
C:\Stata8\ado\base\l\lookfor.ado
*! version 3.2.0  28jun2001

So the only explanation is I need to update my stata? 
Thank you!!!
Best,
Anna


Richard responded:
 What version of Stata are you using?  In Stata 9, I get
 
 . which lookfor
 C:\Program Files\Stata9\ado\base\l\lookfor.ado
 *! version 3.3.1  17dec2003
 
 which is different than the version you list.  It is also version  3.3.1 in Stata 8.2.  Perhaps you need to update your Stata?  If using  anything other than the latest version of Stata, be sure to say  that.  You should also try the -which lookfor- command; perhaps you  aren't executing the program you think you are.
 
 
----- Original Message ----
From: Anna G <[email protected]>
To: [email protected]
Sent: Friday, July 14, 2006 7:31:42 PM
Subject: why is lookfor acting up?

Dear all,
what is happening? 

. lookfor depend
Unknown function ()
r(133);
 
It's installed, the ado file is there (copied below, never touched it). Thank you! 
Best,
Anna
 
*! version 3.2.0  28jun2001
program define lookfor, rclass
 version 7
 if `"`0'"' == "" { error 198 }
 local i 1
 while `"``i''"' != "" {
  local look`i' = lower(`"``i''"')
  local i = `i'+1
 }
 local nlook = `i'-1
 local 0 "_all"
 syntax varlist
 foreach v of local varlist {
  local lbl : variable label `v'
  local touse 0
  forvalues j = 1/`nlook' {
   if index(lower(`"`v'"'),`"`look`j''"') /*
    */ | index(lower(`"`lbl'"'), `"`look`j''"') {
    local touse 1
    continue, break
   }
  }
  if `touse' {
   local list "`list' `v'"
  }
 }
 if "`list'" != "" {
  describe `list'
  return local varlist `list'
 }
end
exit
3.2.0  ported to Stata 7
       lookfor now returns varlist in r(varlist)



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