How would I read from stdin via nimscript?
I tried:
if readLine(stdin) == "yes": exec buildCommand
I ran the script with
nim c build.nims
I get
build.nims (50, 13) Error: undeclared identifier: 'stdin'
I don't think nimscript only supports reading with stdin .
stdin
You may need to create a function request for this: https://github.com/nim-lang/Nim/issues
var f : File; discard f.open(0, fmRead) let s = f.readLine() echo "INPUT " & s
... works - stdin has a file descriptor of 0
Now this is implemented in nimscript in devel: readAllFromStdin() .
readAllFromStdin()
It will be available in Nim v0.20. 0+ (not yet released as of 2019-05-21).
Source: https://habr.com/ru/post/1245383/More articles:UML Domain model - how to model multiple communication roles between two objects? - constraints| Red programming languageAggregation or composition or simple association? - compositionIn the sequel, is it possible to split a request into a subquery using a subload? - node.jsVolley does not work with Gradle 2.0 and instant start - androidCSS: sort list in multiple rows and columns - htmlA PL / R function that takes two tables as arguments - rIs it possible to limit the sql table to only one row at the design stage - sqlHow to make package R recommend a package hosted on GitHub? - rhttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1245388/how-to-use-webpack-and-gulp-with-multiple-entry-points-to-transpile-app-and-test-directories&usg=ALkJrhj2cYEKANVq69iUtMZBZmsk4mclQQAll Articles