INPUT stops loop ignoring TIMER. Use INKEY$ loop.

by (Login burger2227)
R

Your code:

start! = TIMER
DO
finish! = TIMER: tme% = finish! - start! ' ???
LOCATE 25, 5: INPUT "name :"; usrnme$ ' stops the loop anyhow
LOOP WHILE tme% < 30

Simplified:

start! = TIMER ' you are using integer seconds though
DO: K$ = INKEY$
usrnme$ = usrnme$ + K$ ' add key entries
LOCATE 23, 5: PRINT usrnme$ ' you love testing the last 2 rows LOL
LOOP UNTIL TIMER > start! + 30 OR LEN(usrnme$) = 9 ' any length



Posted on Dec 30, 2009, 10:20 PM

Respond to this message   

Return to Index


Response TitleAuthor and Date
That works a treat..thanks..... on Dec 31