Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REPL Bug] stdin does not scans full string. #13

Open
ghost opened this issue Aug 21, 2020 · 1 comment
Open

[REPL Bug] stdin does not scans full string. #13

ghost opened this issue Aug 21, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@ghost
Copy link

ghost commented Aug 21, 2020

@haifenghuang Why stdin >> variable method scans only a char, not a line in REPL?

F8AB0326-9BCD-4D1A-9338-BC2765D3D7B3

Also stdin.read() too

This is only in REPL, if running this code from file, everything works correctly.

@ghost ghost changed the title User input bug, stdin does not scans full string. [REPL bug] stdin does not scans full string. Aug 21, 2020
@ghost ghost changed the title [REPL bug] stdin does not scans full string. [REPL bug] Stdin does not scans full string. Aug 23, 2020
@ghost ghost changed the title [REPL bug] Stdin does not scans full string. [REPL Bug] stdin does not scans full string. Aug 23, 2020
@haifenghuang
Copy link
Owner

haifenghuang commented Aug 24, 2020

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.

@haifenghuang haifenghuang added the bug Something isn't working label Aug 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant