Bluesman
02-07-2006, 03:07 PM
Will this work IF[[#3022GT70000.0][LT150000.0]]GOTO10
If not any ideas on how to do this function without spliting into a 1/2 dozen statements
Bluesman
MetLHead
02-07-2006, 04:30 PM
Will this work IF[[#3022GT70000.0][LT150000.0]]GOTO10
If not any ideas on how to do this function without spliting into a 1/2 dozen statements
Bluesman
I think this is what you want:
IF[[#3022GT70000.0]AND[#3022LT150000.0]]GOTO10
Regards,
Scott
Dan Fritz
02-07-2006, 04:41 PM
Bluesman: You need some kind of boolean operator in the middle of this statement to make it work. Your original statement is:
IF[[#3022GT70000.0][LT150000.0]]GOTO10
It sounds to me like you're trying to find out if the value of #3022 is between 70000.0 and 150000.0 and, if it is, jump to line N10 of your program. Any value less than or equal to 70000.0 or any value greater than or equal to 150000.0 will fail the test, and the program will procede to the next block.
Now, if we break this down, you can see that the part [#3022GT70000.0] is either going to be "True" or "False". You then need to put an AND operator after it, then make another True/False expression, like [#3022LT150000.0]
Here's what I mean:
IF[[#3022GT70000.0]AND[#3022LT150000.0]]GOTO10
This statement tests the first True/False expression: [#3022GT70000.0]. If that expression is True, then it tests the next expression: [#3022LT150000.0]. If that is ALSO true, then the entire expression after the IF statement is true, and the GOTO statement will do its thing.
Hope this helps.
Bluesman
02-07-2006, 05:06 PM
Bluesman: You need some kind of boolean operator in the middle of this statement to make it work. Your original statement is:
IF[[#3022GT70000.0][LT150000.0]]GOTO10
It sounds to me like you're trying to find out if the value of #3022 is between 70000.0 and 150000.0 and, if it is, jump to line N10 of your program. Any value less than or equal to 70000.0 or any value greater than or equal to 150000.0 will fail the test, and the program will procede to the next block.
Now, if we break this down, you can see that the part [#3022GT70000.0] is either going to be "True" or "False". You then need to put an AND operator after it, then make another True/False expression, like [#3022LT150000.0]
Here's what I mean:
IF[[#3022GT70000.0]AND[#3022LT150000.0]]GOTO10
This statement tests the first True/False expression: [#3022GT70000.0]. If that expression is True, then it tests the next expression: [#3022LT150000.0]. If that is ALSO true, then the entire expression after the IF statement is true, and the GOTO statement will do its thing.
Hope this helps.
That is precisly what I need, I am not sure why I did not know that, I have been doi9ng this for so long . Sometime you just need a bit of a boost. Thanks Scott
Bluesman