Correction d'un bug lors de la lecture de l'entrée standard
This commit is contained in:
parent
15afcecabe
commit
a5d820319a
4
main.ml
4
main.ml
@ -24,9 +24,7 @@ let readline () = match file with
|
|||||||
| None -> (
|
| None -> (
|
||||||
Printf.printf ">>> ";
|
Printf.printf ">>> ";
|
||||||
flush stdout;
|
flush stdout;
|
||||||
let line = ref "" in
|
read_line ()
|
||||||
Scanf.scanf "%s" (fun s -> line := s);
|
|
||||||
!line
|
|
||||||
)
|
)
|
||||||
| Some f -> input_line f
|
| Some f -> input_line f
|
||||||
in
|
in
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user