Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
|
|
@ -0,0 +1,2 @@
|
|||
While getKey(0)
|
||||
End
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
!$KEY
|
||||
..........
|
||||
REPEAT
|
||||
GET(K$)
|
||||
UNTIL K$=""
|
||||
..........
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
' FB 1.05.0 Win64
|
||||
|
||||
' Get characters from the keyboard buffer until there are none left
|
||||
While Inkey <> "" : Wend
|
||||
Print "Keyboard buffer flushed"
|
||||
Sleep
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
const TCIFLUSH: cint = 0
|
||||
proc tcflush(fd, queue_selector: cint): cint {.header: "termios.h".}
|
||||
|
||||
discard tcflush(cint(getFileHandle(stdin)), TCIFLUSH)
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
import: console
|
||||
|
||||
System.Console flush
|
||||
|
|
@ -0,0 +1 @@
|
|||
while get_key()!=-1 do end while
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
var k = frequire('Term::ReadKey');
|
||||
|
||||
k.ReadMode('restore'); # Flush the keyboard and returns input stream to initial state
|
||||
# ReadMode 0; # Numerical equivalent of keyboard restore (move comment marker to use instead)
|
||||
|
||||
# A more complete example for use in keyboard handler programming.
|
||||
# We should also check we are being used in an interactive context (not done here).
|
||||
|
||||
k.ReadMode('cbreak');
|
||||
|
||||
# Flush the keyboard in terminal character break mode
|
||||
while (k.ReadKey(-1) != nil) {
|
||||
# Do nothing
|
||||
}
|
||||
|
||||
# Don't forget to restore the readmode, when we are finished using the keyboard
|
||||
k.ReadMode('restore');
|
||||
Loading…
Add table
Add a link
Reference in a new issue