【问题标题】:Does Nim have output buffering?Nim 有输出缓冲吗?
【发布时间】:2017-11-12 17:51:34
【问题描述】:

当我使用 Nim 的 echo 时,我是否必须像使用 Python 的 print 一样刷新输出?如果是,我该怎么做?

【问题讨论】:

    标签: echo flush nim-lang


    【解决方案1】:

    您可以在 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,]

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-02-16
      • 1970-01-01
      • 2010-10-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多