悬赏 500 个论坛币 未解决
forval i=2022/2050{
gen fyear1_`i'=0
gen fyear2_`i'=0
scalar f=freti_`i'[1]
forval j=`=f+1'/`=f+16'{
replace fyear1_`i'=`i'-1-27-(`j'-`=f+1') in `j'
replace fyear2_`i'=`i'-1-(`j'-`=f+1') in `j'
}
}
原本使用2层循环,可以运行。但是在第2层循环前面加了一个标量后,就不行了。看了很多遍,感觉我的代码没什么问题。但是运行后提示“program error: code follows on the same line as open brace”。请教大神指点一下,谢谢!