Origin Ver. 8.6 b70
Operating System: Windows 7 x64
Hi,
I need help with a little problem I have concerning a Labtalk script.
I want to define a range variable depending on a certain condition.
I tried to do this with the following if clause:
if(directioninc < 0) {
range rr1a1 = [%H]1!Col(1);
type "variable < 0";
}
else {
range rr1a2 = [%H]1!Col(1);
type "variable > 0";
};
range rr1b = [%H]1!Col(2);
rr1b = rr1a1;
I do not know why, but for some reason this construct does not work. Everytime I get the error:
Undefined variable: rr1a1
The strange thing is that the if construct seems to work because the "variable > 0" or "variable < 0" is printed every time but somehow the ranges do not get defined, which is the main idea of this part of my script.
Can anyone help me and solve why this does not work?