Using and or for comparassion Help
Jeff_5_
Posts: 36
i declare
buf VAR Word
word1 VAR Word
word2 VAR Word
word3 VAR Word
Read a value in to buf then want to compare them.
If(buf <> word1) & (buf <> word2) Then
word3=buf
The problem is it wont do both comparisons with the & symbol how can i make this work?
I have the same problem with the OR |
If(buf = word1) | (buf = word2) Then
High enable
It wont do the compassion with the OR symbol between the two
Post Edited (Jeff_5_) : 8/6/2010 12:26:16 AM GMT
buf VAR Word
word1 VAR Word
word2 VAR Word
word3 VAR Word
Read a value in to buf then want to compare them.
If(buf <> word1) & (buf <> word2) Then
word3=buf
The problem is it wont do both comparisons with the & symbol how can i make this work?
I have the same problem with the OR |
If(buf = word1) | (buf = word2) Then
High enable
It wont do the compassion with the OR symbol between the two
Post Edited (Jeff_5_) : 8/6/2010 12:26:16 AM GMT
Comments
IF (buf <> word1) AND (buf <> word2) THEN