RosettaCodeData/Task/Keyboard-input-Flush-the-keyboard-buffer/Nim/keyboard-input-flush-the-keyboard-buffer.nim
2023-07-01 13:44:08 -04:00

4 lines
149 B
Nim

const TCIFLUSH: cint = 0
proc tcflush(fd, queue_selector: cint): cint {.header: "termios.h".}
discard tcflush(cint(getFileHandle(stdin)), TCIFLUSH)