magpie
magpie copied to clipboard
[REPL Bug] stdin does not scans full string.
@haifenghuang Why stdin >> variable method scans only a char, not a line in REPL?

Also stdin.read() too
This is only in REPL, if running this code from file, everything works correctly.
I've checked this, and cannot figure out what's the problem. I think it might related to liner problem, so I've contacted the liner author, below is the link:
os.Stdin.Read only read one character
so, my suggestion is not use stdin >> variable in the REPL, it's a REPL bug, and cannot be easily solved.