Page 1 of 1

FOR LOOP

Posted: Tue Apr 11, 2017 5:12 am
by gansuld
I have the following formula,
frml r_l_loan_bs = l_loan_bs - l_cpi

How to write FOR loop above formula in case of many variables?

Actually, I have written like this

frml r_l_loan_bs = l_loan_bs - l_cpi
for %x l_loan_min l_loan_agr l_loan_manu l_loan_elec l_loan_cons l_loan_trade l_loan_ser
frml r_{%x} = {%x} - l_cpi

But it didn't work. Please help me!

Re: FOR LOOP

Posted: Tue Apr 11, 2017 5:37 am
by The Yoyo
Not sure what frml is, why not use genr?

Something like:

Code: Select all

genr r_l_loan_bs = l_loan_bs - l_cpi
for %x l_loan_min l_loan_agr l_loan_manu l_loan_elec l_loan_cons l_loan_trade l_loan_ser
genr r_{%x} = {%x} - l_cpi
next

Re: FOR LOOP

Posted: Tue Apr 11, 2017 5:51 am
by gansuld
Thanks!