I am trying to pick up Julia and I wanted to program a tiny game where the user would guess a random number from [0-9]. But, user input does not work for me and I don't understand why.
I am on Windows 10, Visual Studio 1.37.1 (with Julia extension), Julia 1.2.0.
I have tried to get user input on the REPL, no problem.
Now if I put the exact same code in a script and julia < my_script.jl
, it does not work. The script runs, but it does not let me write anything.
x = readline(); println(x)
This is the code that works in REPL, but not in script
I expect the script to halt, let me enter the input then print what I have entered, but it does not stop for me to write anything and just prints an empty line.