Posted: Tue Apr 22, 2003 9:49 am Post subject: Inkey in turing
In QBasic, there is a command that will wait until a key is pressed.
code:
DO
'expressions
LOOP WHILE inkey$=""
or
code:
DO
'expressions
SLEEP
LOOP UNTIL 'statement is true'
Is there a similar command in Turing that will wait until the key is pressed?[/code]
Sponsor Sponsor
tomako
Posted: Tue Apr 22, 2003 9:56 am Post subject: (No subject)
im thinking getch, but i duno how u can wait til a "certain key"...
Blade
Posted: Tue Apr 22, 2003 10:51 am Post subject: (No subject)
yeah use getch, with a loop... we'll use 'h' as the certian key your waiting for
code:
var anykey:string(1) %for getch the string has to be one character
loop
getch(anykey)
exit when anykey = "h"
put "Thats not the right key, you must press 'h'"
end loop