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
637 B
Plaintext
28 lines
637 B
Plaintext
7 months ago
|
*! NJC 1.0.0 19 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': `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': `badlist'{p_end}"
|
||
|
return local badlist "`badlist'"
|
||
|
}
|
||
|
end
|