(************************************************************ get.ml Created : Fri Oct 25 01:46:54 2002 Last modified: Fri Oct 25 02:58:50 2002 Compile: ocamlfind ocamlc -package getopt -linkpkg get.ml -o get # ************************************************************) let filename = ref (None : string option) let specs = [ ( 'f', "", None, Some (fun x -> filename := Some x)) ] let _ = begin Getopt.parse_cmdline specs print_endline; print_endline (match !filename with None -> "nofile" | Some x -> x) end