How about
Confirmation:
confirm_flag=0
x=0
WHILE (x<300) and (confirm_flag=0)
Pause 10 'check for button every 10ms
if Switch = 1 then confirm_flag=1 ' if button pushed then set the flag
x=x+1 ' increment the pause counter
WEND
Return
comfirm_flag will be 0 if no confiirm, 1 if confirmed. Routine will exit as soon as button is pushed.
Duncan
Bookmarks