Syntax Error in seemingly identical code?
Posted: Wed Apr 08, 2015 6:01 pm
I am writing some code and it keeps giving me a syntax error when I don't believe that I should be getting one. I took a small portion of the first program that I wrote below. This code works fine, but for some reason the second iteration fails.
However the code that follows here is a no go.
Specific error shown below. eeboro_1 is a series located within my workfile, so there is no issue there. I assume the error lies with the lag, but the first set of code used a similar technique so I am unsure where the mistake follows.

Code: Select all
series histwa{%st} = ((wa{%st}/wa{%st}(-!h1))^(4/!h1)-1)*100 - ((gwa{%st}/gwa{%st}(-!h1))^(4/!h1)-1)*100
series forewa{%st} = ((wa{%st}/wa{%st}(-!f1))^(4/!f1)-1)*100 - ((gwa{%st}/gwa{%st}(-!f1))^(4/!f1)-1)*100
series carn{%st} = ((wa{%st}/wa{%st}(-!f1))^(4/!f1)-1)*100Code: Select all
!h1=@dtoo(%a)-@dtoo(%sd)
for %z {%metro}
series CAR{%0}{%z}_{%sim} = (({%0}{%z}_1/({%0}{%z}_1)(-!h1))^(4/!h1)-1)*100)
series CAR{%0}{%z}_{%old1} = (({%0}{%z}_{%old1}/({%0}{%z}_{%old1})(-!h1))^(4/!h1)-1)*100)
series CAR{%0}{%z}_{%old2} = (({%0}{%z}_{%old2}/({%0}{%z}_{%old2})(-!h1))^(4/!h1)-1)*100)
next