summaryrefslogtreecommitdiffstats
path: root/stdlib/arg.mli
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>1998-04-27 09:55:50 +0000
committerXavier Leroy <xavier.leroy@inria.fr>1998-04-27 09:55:50 +0000
commit95933de17c122f254bd91231d04b9cab89f134c3 (patch)
treedcb89d15970690700b3c6ccf95a5c4a0f3d8b3e6 /stdlib/arg.mli
parent208be2cae2ec48293f30590ba9184f0e813402d2 (diff)
Corrections mineures sur la documentation
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1933 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'stdlib/arg.mli')
-rw-r--r--stdlib/arg.mli17
1 files changed, 9 insertions, 8 deletions
diff --git a/stdlib/arg.mli b/stdlib/arg.mli
index f5e2acf68..ec5106806 100644
--- a/stdlib/arg.mli
+++ b/stdlib/arg.mli
@@ -52,7 +52,7 @@ type spec =
val parse : (string * spec * string) list -> (string -> unit) -> string -> unit
(*
- [parse speclist anonfun usage_msg] parses the command line.
+ [Arg.parse speclist anonfun usage_msg] parses the command line.
[speclist] is a list of triples [(key, spec, doc)].
[key] is the option keyword, it must start with a ['-'] character.
[spec] gives the option type and the function to call when this option
@@ -62,8 +62,8 @@ val parse : (string * spec * string) list -> (string -> unit) -> string -> unit
The functions in [spec] and [anonfun] are called in the same order
as their arguments appear on the command line.
- If an error occurs, [parse] exits the program, after printing an error
- message as follows:
+ If an error occurs, [Arg.parse] exits the program, after printing
+ an error message as follows:
- The reason for the error: unknown option, invalid or missing argument, etc.
- [usage_msg]
- The list of options, each followed by the corresponding [doc] string.
@@ -79,19 +79,20 @@ val parse : (string * spec * string) list -> (string -> unit) -> string -> unit
exception Bad of string
(*
- Functions in [spec] or [anonfun] can raise [Bad] with an error
+ Functions in [spec] or [anonfun] can raise [Arg.Bad] with an error
message to reject invalid arguments.
*)
val usage: (string * spec * string) list -> string -> unit
(*
- [usage speclist usage_msg]
- [speclist] and [usage_msg] are the same as for [parse]. [usage]
- prints the same error message that [parse] prints in case of error.
+ [Arg.usage speclist usage_msg] prints an error message including
+ the list of valid options. This is the same message that
+ [Arg.parse] prints in case of error.
+ [speclist] and [usage_msg] are the same as for [Arg.parse].
*)
val current: int ref;;
(*
Position (in [Sys.argv]) of the argument being processed. You can
- change this value, e.g. to force [parse] to skip some arguments.
+ change this value, e.g. to force [Arg.parse] to skip some arguments.
*)