Added a usage message.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4914 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
38627eac3f
commit
649893ed17
1 changed files with 9 additions and 0 deletions
|
|
@ -4,6 +4,15 @@ open Example
|
||||||
|
|
||||||
exception BadReturn
|
exception BadReturn
|
||||||
|
|
||||||
|
let _ = if Array.length Sys.argv < 3 then
|
||||||
|
begin
|
||||||
|
print_endline
|
||||||
|
("Usage: " ^ Sys.argv.(0) ^ " n1 n2\n" ^
|
||||||
|
" Displays the least factors of the numbers that have the same\n" ^
|
||||||
|
" relationship, 16 12 -> 4 3\n") ;
|
||||||
|
exit 0
|
||||||
|
end
|
||||||
|
|
||||||
let x = int_of_string Sys.argv.(1)
|
let x = int_of_string Sys.argv.(1)
|
||||||
let y = int_of_string Sys.argv.(2)
|
let y = int_of_string Sys.argv.(2)
|
||||||
let (xf,yf) = match _factor (C_list [ C_int x ; C_int y ]) with
|
let (xf,yf) = match _factor (C_list [ C_int x ; C_int y ]) with
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue