【发布时间】:2017-11-12 17:51:34
【问题描述】:
当我使用 Nim 的 echo 时,我是否必须像使用 Python 的 print 一样刷新输出?如果是,我该怎么做?
【问题讨论】:
当我使用 Nim 的 echo 时,我是否必须像使用 Python 的 print 一样刷新输出?如果是,我该怎么做?
【问题讨论】:
您可以在 Nim 中使用 flushFile(stdout) 刷新标准输出:https://nim-lang.org/docs/system.html#flushFile,File_2
但您不必这样做,因为echo 等同于writeLine(stdout, x); flushFile(stdout):https://nim-lang.org/docs/system.html#echo,varargs[typed,]
【讨论】: