Dear Statalist colleagues,

I am keep calculating same formula for more than 10 variables and wanted to ask if I could create a program(function) in which I pass all these arguments, and would generate the new variables.
I can use a for loop, but wanted to learn if there is any possible way to write a program for this calculation. It would be so grateful if I could please learn it. I know it might take less time to just run these one by one, but wanted to develop my skills.

Code:
gen Return= log(Price/L4.Price) * 100
gen Growth= log(Inv/L4.Inv) * 100
.
.
.
Thank you so much!
Ed