I can't get the user input in OCaml
When I use built-in functions like read_int()
, read_line()
, they wait for input also if I just typed it e pressed ENTER
.
This screenshot can probably explain better than me
And it waits until I put ;;
but then it returns Exception: Failure "int_of_string".
, cause, I think, it reads ;;
as part of the input.
I saw in another question that i can type the input as usual but instead of pressing ENTER
I should use M-x comint-send-input
so tuareg won't check for ;;
. But this way it's a bit tricky if you have to do the same thing everytime, so do you know how to solve the problem?
Thank you
from Recent Questions - Stack Overflow https://ift.tt/3jD2ykm
https://ift.tt/eA8V8J
Comments
Post a Comment