summaryrefslogtreecommitdiffstats
path: root/ocamlbuild/examples/example2/hello.ml
diff options
context:
space:
mode:
Diffstat (limited to 'ocamlbuild/examples/example2/hello.ml')
-rw-r--r--ocamlbuild/examples/example2/hello.ml14
1 files changed, 14 insertions, 0 deletions
diff --git a/ocamlbuild/examples/example2/hello.ml b/ocamlbuild/examples/example2/hello.ml
new file mode 100644
index 000000000..b48806a3d
--- /dev/null
+++ b/ocamlbuild/examples/example2/hello.ml
@@ -0,0 +1,14 @@
+open Greet
+
+let _ =
+ let name =
+ if Array.length Sys.argv > 1 then
+ Sys.argv.(1)
+ else
+ "stranger"
+ in
+ greet
+ (if name = "Caesar" then Nicely else Badly)
+ name;
+ Printf.printf "My name is %s\n" Sys.argv.(0)
+;;