Help with for...next
MikeS
Posts: 131
Seasons Greetings,
Attached is a program that I wrote to interface a BS2 with a serial keypad (0-9, ABCDEF#*). The keypad works fine. I want·the·user to enter a 5 digit password that matches the one stored in EEPROM to continue. The program is waiting for the fifth digit to be entered but is·ignoring it and only looks at the first four. I am assuming that I am doing something wrong inside the For... Next loop but I can not see what it is. Any help would be appreciated.
MikeS
Attached is a program that I wrote to interface a BS2 with a serial keypad (0-9, ABCDEF#*). The keypad works fine. I want·the·user to enter a 5 digit password that matches the one stored in EEPROM to continue. The program is waiting for the fifth digit to be entered but is·ignoring it and only looks at the first four. I am assuming that I am doing something wrong inside the For... Next loop but I can not see what it is. Any help would be appreciated.
MikeS
txt
3K
Comments
So, your "For indx = 1 to 5" is skipping the zeroth character, and running off the end of the array for the fifth character.
That was it.
Thank you very much.
MikeS