Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- open Printf
- let check_args_width_height number =
- if int_of_string number < 0 then failwith "Wrong arguments"
- let () =
- Sdl.init [`VIDEO];
- Sdlvideo.set_video_mode 200 200 [];
- Sdltimer.delay 2000;
- Sdl.quit();
- print_endline (string_of_int (Array.length Sys.argv));
- try
- if Array.length Sys.argv != 3 then failwith "Wrong number arguments : ./step1 width height"
- with
- | Failure ex -> print_endline "Wrong number arguments : ./step1 width height"; exit(1);;
- try
- Arg.parse [] check_args_width_height "Wrong value : ./step1 width(int) height(int)"
- with
- | Failure ex -> print_endline "Wrong value : ./step1 width(int) height(int)"; exit(1);;
- print_endline "[DEBUG] Parsing ok";
- print_endline "[DEBUG] Continue ..";
- let testMod = Labyrinthe.create 42 43 [| |] in
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement