Documentation + parse_argv introduction.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4557 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Pierre Weis 2002-03-23 16:30:01 +00:00
parent e40ea8f198
commit ae91006786
2 changed files with 5 additions and 5 deletions

View File

@ -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;;

View File

@ -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