Hi
My program is as follows:
If sms[0]="a" and sms[1]="c" and sms[2]="t" then ' Statement 1
If (sms[0]="a"or"A") and (sms[1]="c"or"C") and (sms[2]="t"or"T") then ' Statement 2
for c=1 to 30
pause 100
toggle portb.6
pause 100
next c
endif
If sms[0]="d" and sms[1]="e" and sms[2]="a" and sms[3]="c" and sms[4]="t" then 'Statement 3
If (sms[0]="d"or"D") and (sms[1]="e"or"E") and (sms[2]="a"or"A") and (sms[3]="c"or"C") and (sms[4]="t"or"T") then ' Statement 4
for c=1 to 30
pause 500
toggle portb.6
pause 500
next c
endif
Problem:
I only use either statement 1 or 2 AND 3 or 4. Now when I use statement 1 & 3, the program works fine BUT when I use statement 2 & 4, the program keeps entering statement 2 even if statement 4 is valid!
Can someone help me understand why this is happening?
Thanks
Bookmarks