Flow chart this. You will need a routine that sets a boolean variable
when a key has been pressed, or a method of checking when the key has
been pressed.
A flow chart will give you the program flow,
Example as a start, using words...
Initialize all switches to not pressed.
is switch pressed? if not, loop on this question
is switch UP switch, if yes, go to next statement, if no print error
// up has to be first
is switch DOWN switch, if yes, go to DOWN, if not, go to next
statement
is up switch already pressed? if so, print error. if not, go to next
statement
.... code here to handle up switch press and then reset up switch
pressed and go back to looking for switch pressed
DOWN:
is down switch already pressed? if so, print error, if not, go to
next statement
..... etc
Harvey
>
>Thanks.