Nim lang 如何使用nim脚本读取stdin?

Nim lang 如何使用nim脚本读取stdin?,nim-lang,Nim Lang,我如何通过nimscript读取stdin 我试过了: if readLine(stdin) == "yes": exec buildCommand 我已使用运行脚本 nim c build.nims 我收到 build.nims(50,13)错误:未声明的标识符:“stdin” 我认为nimscript目前还不支持从stdin读取 您可能需要为此创建功能请求: 。。。works--stdin具有文件句柄0这现在在devel:中的nimscript中实现 它将在Nim v0.20.0

我如何通过nimscript读取stdin

我试过了:

if readLine(stdin) == "yes":
  exec buildCommand  
我已使用运行脚本

nim c build.nims
我收到

build.nims(50,13)错误:未声明的标识符:“stdin”


我认为nimscript目前还不支持从
stdin
读取

您可能需要为此创建功能请求:


。。。works--stdin具有文件句柄0

这现在在devel:中的nimscript中实现


它将在Nim v0.20.0+(2019-05-21尚未发布)中提供。

给我
foo.nims(2,10)错误:试图调用未声明的例程:“打开”
我在
版本0.13.0
嗯。。。我也在用那个版本。对我来说,它决定(FileHandle只是cint)
var f : File;
discard f.open(0, fmRead)

let s = f.readLine()
echo "INPUT " & s