LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

LabWindows While statement problem

The while statement is not working properly
 
I have next line in my code:
 
while(ReceiveBuf.Data[1]!=0x83 && ReceiveBuf.Data[2]!=0x82  && ReceiveBuf.Data[3]!=ACK){
...
}
 
The only way I should be able to leave that while is when Data1 = 83 Data2= 82 AND Data3 = ACK but when ONLY one of those conditions is true it leaves the while statement as if I was using OR instead AND
 
Smiley Happy Funny isnt it?
 
 
0 Kudos
Message 1 of 2
(2,778 Views)
I found why.
 
When it enters into the while statement everything is true and when one of those conditions is false it makes an "and operation" and the whole while is false so it exits


Message Edited by netoxp on 07-09-2008 02:08 PM
0 Kudos
Message 2 of 2
(2,767 Views)