Origin Ver. and SR (Select Help-->About Origin): 7.5 Operating System: WinXP
Dear all,
for column labeling I loop over all worksheets with specific names and label the respective 3rd column as a function of the counter i. In the beginning of the loop I have an if-condition which works fine. The worksheets have names like f1p6cv001, f1p6cv002, etc. But for some reason using the second if-conditions for the column labeling does not work. Here is the code:
%M="f1p6cv"; for(i=1;i<56;i++) { if(i<10) %N=%M00$(i); else %N=%M0$(i); win -a %N; type -c "%N"; if(i<=12) wks.col3.label$="$((i-1)*0.25)"; if(12<i&&i<33) wks.col3.label$="$(i-10)"; else wks.col3.label$="$((i-21)*2)"; };
If I do it by hand, i.e. three different for-loops, it works of course. But why does LabTalk not let me use the if-condition in front of the wks.col3.label$-command? If I use just another if-condition, like e.g. if(i<13) type -c "i<13"; after the line win -a %N; type -c "%N"; it works again.