Hi all,
I want to compare two strings: ID_RX[] = ID_string[].
Both are two digits long. 01 to 99.
I tried with: ID_RX[0] = ID_string[0] AND ID_RX[1] = ID_string[1] in a Decision box, but is not working.
I tried with: ID_RX[Index] = ID_string[Index] but the result is the same, not working.
It would be a solution to compare the first digit when it comes through RS232, and the second after that.
I wanted, to read in the two digits and compare after.
Is there any solution?
Thanks in advance
Regards
Vidor
Comparing strings
- Steve
- Matrix Staff
- Posts: 3433
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
Re: Comparing strings
Try this:
The word "AND" is used for a bitwise-And, not a logical-And.
Code: Select all
(ID_RX[0] = ID_string[0]) && (ID_RX[1] = ID_string[1])