Im' newbie in Ocaml and Im'trying to do this :
let medio a b =
(a + b);;
let () = Printf.printf "%d + %d = %d\n" Sys.argv.(1) Sys.argv.(2) (medio Sys.argv.(1) Sys.argv.(2))
Sys.argv.(1) has to be the arg[1] ~ in C
Now I want to use them like parameters for my function medio, but they 're strings. How can I parase them into int ? Is there a ocaml function to do it? In python is int(Sys.argv.(2)) or int atoi(const char *str) in C in ocaml ?