RosettaCodeData/Task/Spinning-rod-animation-Text/True-BASIC/spinning-rod-animation-text.basic
2023-07-01 13:44:08 -04:00

27 lines
513 B
Text

DEF Inkey$
LOCAL t_arg1
IF key input then
GET KEY t_arg1
IF t_arg1 <= 255 then
LET inkey$ = chr$(t_arg1)
ELSE
LET inkey$ = chr$(0) & chr$(t_arg1-256)
END IF
ELSE
LET inkey$ = ""
END IF
END DEF
LET spinning$ = "|/-" & chr$(92)
DO while inkey$ = ""
CLEAR
PRINT
PRINT " hit any key to end program ";
PRINT (spinning$)[c:c+1-1]
LET c = c+1
PAUSE .25 ! in milliseconds
IF c = 4 THEN LET c = 1
LOOP
END