I have a simple script like the one below.
for A=[0:5] if A==2 B=0; else B=1; C=A+B endend
I want the script to calculate the value of C for every A, but at the moment the formula for C is within the 'else' part of the loop. Therefore when A=2, no value of C is calculated. I know that I can put the statement within the 'if' part of the loop, but this is a simplified version and I have a much more complex if else loop with a larger statement so want to know if there is a better way.
Thanks.
Best Answer