Problem with if statement
Posted: Mon Sep 12, 2011 7:01 am
I am having a problem with a ridiculously routine task. I am trying to execute an if statement of the following type
I don't actually want to create a series 'm' that equals 1, but have shown that for simplicity. When I run this code, eviews does not create the series 'm' at all. The variable 'check' is a dummy so it always equals either 0 or 1. However. within the if statement, eviews doesn't seem to be reading the 1s in the series. If I add another line of code 'else series m = 0' it does create a series m but it always equals 0.
So basically, for some reason eviews thinks the condition is never true when in fact it is true in many periods.
Code: Select all
series check = @isna(forex)
if check=1 then
series m = 1
endif
So basically, for some reason eviews thinks the condition is never true when in fact it is true in many periods.