You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
656 B
Plaintext
28 lines
656 B
Plaintext
*! NJC 1.0.0 20 Sept 2005
|
|
program isvar, rclass
|
|
version 8
|
|
syntax anything
|
|
|
|
foreach v of local anything {
|
|
capture unab V : `v'
|
|
if _rc == 0 local varlist `varlist' `V'
|
|
else local badlist `badlist' `v'
|
|
}
|
|
|
|
di
|
|
|
|
if "`varlist'" != "" {
|
|
local n : word count `varlist'
|
|
local what = plural(`n', "variable")
|
|
di as txt "{p}`what': " as res "`varlist'{p_end}"
|
|
return local varlist "`varlist'"
|
|
}
|
|
|
|
if "`badlist'" != "" {
|
|
local n : word count `badlist'
|
|
local what = plural(`n', "not variable")
|
|
di as txt "{p}`what': " as res "`badlist'{p_end}"
|
|
return local badlist "`badlist'"
|
|
}
|
|
end
|