I just I came across a behavior that I had never noticed before using if-then statements.
The scenario is:
Chart with only data1, i add the signal below, and as long as the type is set to 1 it works fine since the line "if type = 2 then value1 = c of data2 ;" is ignored.
Setting type = 2 of course triggers the missing data 2 error, which is the behaviour i would expect.
Then why if i simply uncomment the last line "if type = 3 then value1 = AverageFC(c of data2,20)" , keeping the type = 1, i get the error ?
Isn't this line supposed to be considered and therefore trigger the error message only if type = 3 ?
Code: Select all
input: Type(1);
if type = 1 then value1 = c;
if type = 2 then value1 = c of data2 ;
//if type = 3 then value1 = AverageFC(c of data2,20) ;