You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 2188 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Heinz Deinhart
Version: Objective Caml version 3.07+2
OS: Linux (Redhat 7.x with src.rpm compiled)
Submission from: h081217015199.dyn.cm.kabsi.at (81.217.15.199)
There seems to be a problem in Arg.parse with the usage output in case of a
missing
argument for an option. Probably some problem with the buffer used in there?
It is quite simple to reproduce:
emp@ei:~/cvs.nix.at/Code/gemma> cat argbug.ml
let speclist = [
("-i", Arg.Int (fun i -> Printf.printf "int -i: %i\n" i), "a nice integer")
]
let anonfun s =
Printf.printf "anonfun called with: %s\n" s
let _ =
Arg.parse speclist anonfun "usage message\n";
exit 0
emp@ei:~/cvs.nix.at/Code/gemma> ocaml argbug.ml -x # this works
argbug.ml: unknown option `-x'.
usage message
-i a nice integer
-help Display this list of options
--help Display this list of options
emp@ei:/cvs.nix.at/Code/gemma> ocaml argbug.ml -i 10 # this works, too
int -i: 10
emp@ei:/cvs.nix.at/Code/gemma> ocaml argbug.ml -i # this prints strange
msg
argbug.ml: option `-i' needs an argument.
usage message
-i a nice integer
-help Display this list of options
--help Display this list of options
argbug.ml: argbug.ml: option `-i' needs an argument.
usage message
-i a nice integer
-help Display this list of options
--help Display this list of options
.
usage message
-i a nice integer
-help Display this list of options
--help Display this list of options
emp@ei:~/cvs.nix.at/Code/gemma>
The text was updated successfully, but these errors were encountered:
There seems to be a problem in Arg.parse with the usage output in case of a
missing
argument for an option. Probably some problem with the buffer used in there?
It is quite simple to reproduce:
Thanks for the report. This is indeed a bug in 3.07+2, and it is already fixed
in
the CVS version.
Original bug ID: 2188
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Heinz Deinhart
Version: Objective Caml version 3.07+2
OS: Linux (Redhat 7.x with src.rpm compiled)
Submission from: h081217015199.dyn.cm.kabsi.at (81.217.15.199)
There seems to be a problem in Arg.parse with the usage output in case of a
missing
argument for an option. Probably some problem with the buffer used in there?
It is quite simple to reproduce:
emp@ei:~/cvs.nix.at/Code/gemma> cat argbug.ml
let speclist = [
("-i", Arg.Int (fun i -> Printf.printf "int -i: %i\n" i), "a nice integer")
]
let anonfun s =
Printf.printf "anonfun called with: %s\n" s
let _ =
Arg.parse speclist anonfun "usage message\n";
exit 0
emp@ei:~/cvs.nix.at/Code/gemma> ocaml argbug.ml -x # this works
argbug.ml: unknown option `-x'.
usage message
-i a nice integer
-help Display this list of options
--help Display this list of options
emp@ei:
/cvs.nix.at/Code/gemma> ocaml argbug.ml -i 10 # this works, too/cvs.nix.at/Code/gemma> ocaml argbug.ml -i # this prints strangeint -i: 10
emp@ei:
msg
argbug.ml: option `-i' needs an argument.
usage message
-i a nice integer
-help Display this list of options
--help Display this list of options
argbug.ml: argbug.ml: option `-i' needs an argument.
usage message
-i a nice integer
-help Display this list of options
--help Display this list of options
.
usage message
-i a nice integer
-help Display this list of options
--help Display this list of options
emp@ei:~/cvs.nix.at/Code/gemma>
The text was updated successfully, but these errors were encountered: