I am trying to learn the foreach loop command in Stata 13.0.
I want to label multiple variables using the foreach loop but whenever i enter the command below,
i get an invalid syntax error message.
Code:
sysuse auto.dta, clear
foreach x of varlist make - foreign{
    label variable `x'  `x' "for survey one"
    }
The result is:
Code:
invalid syntax