1

Do I have to flush output when I'm using Nim's echo like I do with Python's print? If yes, how can I do that?

Adrien
  • 469
  • 3
  • 11

1 Answers1

4

You can flush stdout in Nim with flushFile(stdout): https://nim-lang.org/docs/system.html#flushFile,File_2

But you don't have to do that since echo is equivalent to writeLine(stdout, x); flushFile(stdout): https://nim-lang.org/docs/system.html#echo,varargs[typed,]

def-
  • 5,275
  • 20
  • 18