Documentation + parse_argv introduction.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4557 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
e40ea8f198
commit
ae91006786
|
@ -51,7 +51,7 @@ let usage speclist errmsg =
|
||||||
|
|
||||||
let current = ref 0;;
|
let current = ref 0;;
|
||||||
|
|
||||||
let parse_array argv speclist anonfun errmsg =
|
let parse_argv argv speclist anonfun errmsg =
|
||||||
let initpos = !current in
|
let initpos = !current in
|
||||||
let stop error =
|
let stop error =
|
||||||
let progname =
|
let progname =
|
||||||
|
@ -120,4 +120,4 @@ let parse_array argv speclist anonfun errmsg =
|
||||||
done;
|
done;
|
||||||
;;
|
;;
|
||||||
|
|
||||||
let parse = parse_array Sys.argv;;
|
let parse = parse_argv Sys.argv;;
|
||||||
|
|
|
@ -78,10 +78,10 @@ val parse :
|
||||||
own [-help] and [--help] options in [speclist].
|
own [-help] and [--help] options in [speclist].
|
||||||
*)
|
*)
|
||||||
|
|
||||||
val parse_array : string array ->
|
val parse_argv : string array ->
|
||||||
(string * spec * string) list -> (string -> unit) -> string -> unit
|
(string * spec * string) list -> (string -> unit) -> string -> unit
|
||||||
(** [Arg.parse_array a speclist anonfun usage_msg] parses array [a] as
|
(** [Arg.parse_argv args speclist anonfun usage_msg] parses array [args] as
|
||||||
if it were the the command line. *)
|
if it were the command line. *)
|
||||||
|
|
||||||
exception Bad of string
|
exception Bad of string
|
||||||
(** Functions in [spec] or [anonfun] can raise [Arg.Bad] with an error
|
(** Functions in [spec] or [anonfun] can raise [Arg.Bad] with an error
|
||||||
|
|
Loading…
Reference in New Issue