第一种方式
sysuse auto,clear
foreach v of varlist _all {
dis "`v'"
}
第二种方式
ds
foreach v of varlist `r(varlist)' {
dis "`v'"
}
第三种方式
findname
foreach v of varlist `r(varlist)' {
dis "`v'"
}
sysuse auto,clear
foreach v of varlist _all {
dis "`v'"
}
ds
foreach v of varlist `r(varlist)' {
dis "`v'"
}
findname
foreach v of varlist `r(varlist)' {
dis "`v'"
}