PDA

View Full Version : Need help with matching



Christopher4187
- 28th January 2007, 02:25
Hi,

I have a question and I hope I relay it correctly. What I am trying to do is input a code, lets say 3,4,5,6. Each number gets a specific position and that would look like key1=3, key2=4...... So, here I have my code of key1, key2, key3 and key4 which is 3,4,5,6.

I know how to check one number but I don't know how to check four numbers as a group. In other words, 3,4,5,6 checks agains 3,4,5,6. Any suggestions?

Thanks,

Chris

paul borgmeier
- 28th January 2007, 13:17
IF key1=3 THEN
IF key2=4 THEN
IF key3=5 THEN
IF key4 = 6 THEN CodeRight
ENDIF
ENDIF
ENDIF
' Continue on here – code did not match




CodeRight: ' Subroutine, jump to here – code matches

OR


IF (key1=3) AND (key2=4) AND (key3 = 5) AND (key4=6) THEN CodeRight

Christopher4187
- 28th January 2007, 13:45
Thanks for the reply Paul, I will give this a shot today!