当“md”“=”“lowess”时执行if和else语句。有谁能解释一下世界上这有可能吗?!
loc methods "connected lowess"
foreach md in `methods' {
if "`md'"=="lowess" {
di "`md'==lowess"
}
else
{
di "`md'!=lowess"
}
}
输出结果为:
. do "/tmp/SD11749.000000"
. loc methods "connected lowess"
.
. foreach md in `methods' {
2. if "`md'"=="lowess" {
3. di "`md'==lowess"
4. }
5. else
6. {
7. di "`md'!=lowess"
8. }
9. }
connected!=lowess
lowess==lowess
lowess!=lowess
答案 0 :(得分:4)
您的else
和后续{
必须在同一行