Hello,

I want to loop over my variable list, but also be able to have a number `i' that reflects the loop iteration.
Code:
foreach var in varlist *{
[command using loop iteration `i' and `var']
}
Is there a way to have both of these in the loop? Or another way to accomplish?

All I know how to do is manually create a list of locals like this with the whole varlist:
Code:
local variable1 make
local variable2 price 
local variable3 mpg
[...]
Then loop with i = 1/n and variable`i'

But is there a way to do this without making that local list manually?


Thanks for any help!

Reese