RosettaCodeData/Task/Keyboard-input-Keypress-check/Oforth/keyboard-input-keypress-check-2.oforth
2016-12-05 23:44:36 +01:00

3 lines
309 B
Text

System.Console receive ->key // Wait until a key is pressed ( = receiveTimeout(null) )
System.Console receiveChar ->aChar // Wait until a character is pressed. All other keys are ignored
System.Console receiveTimeout(0) ->key // Check if a key is pressed and return immediatly