Keyboard input/Flush the keyboard buffer: Difference between revisions

m (syntax highlighting fixup automation)
imported>Fth
 
(One intermediate revision by one other user not shown)
Line 1,095:
end while</syntaxhighlight>
 
=={{header|Forth}}==
<syntaxhighlight lang="forth">
: flush-keys begin key? while key drop repeat ;
</syntaxhighlight>
=={{header|FreeBASIC}}==
<syntaxhighlight lang="freebasic">' FB 1.05.0 Win64
Line 1,552 ⟶ 1,556:
 
It is necessary to type in some keys first (and have them echoed) to demonstrate that it is in fact working. 'Raw' mode can't be used here as keyboard input is not buffered in that mode.
<syntaxhighlight lang="ecmascriptwren">import "io" for Stdin
 
System.print("Press some keys followed by enter.")
Anonymous user