summaryrefslogtreecommitdiff
path: root/Examples/ocaml
diff options
context:
space:
mode:
authorArt Yerkes <ayerkes@speakeasy.net>2003-06-19 21:29:08 +0000
committerArt Yerkes <ayerkes@speakeasy.net>2003-06-19 21:29:08 +0000
commit6c133218789d65503c2b83d787d71d68996daf36 (patch)
tree56922d1ccee24ad2208d388e287c124f414b14ab /Examples/ocaml
parentac6e7eaa4419163a737760bad0595f6a9ad2ed9f (diff)
downloadswig-6c133218789d65503c2b83d787d71d68996daf36.tar.gz
Added a usage message.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4914 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Examples/ocaml')
-rw-r--r--Examples/ocaml/argout_ref/example_prog.ml9
1 files changed, 9 insertions, 0 deletions
diff --git a/Examples/ocaml/argout_ref/example_prog.ml b/Examples/ocaml/argout_ref/example_prog.ml
index bcf23251e..090f80793 100644
--- a/Examples/ocaml/argout_ref/example_prog.ml
+++ b/Examples/ocaml/argout_ref/example_prog.ml
@@ -4,6 +4,15 @@ open Example
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 y = int_of_string Sys.argv.(2)
let (xf,yf) = match _factor (C_list [ C_int x ; C_int y ]) with