| Anonymous | Login | Signup for a new account | 2013-05-25 01:19 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||
| 0000122 | OCaml | OCaml general | public | 2000-05-20 23:13 | 2000-05-24 03:36 | |||
| Reporter | administrator | |||||||
| Assigned To | ||||||||
| Priority | normal | Severity | minor | Reproducibility | always | |||
| Status | closed | Resolution | fixed | |||||
| Platform | OS | OS Version | ||||||
| Product Version | ||||||||
| Target Version | Fixed in Version | |||||||
| Summary | 0000122: Command line arguments | |||||||
| Description | Full_Name: Gerd Stolpmann Version: Ocaml 3.00 OS: Submission from: p3e9c36be.dip0.t-ipconnect.de (62.156.54.190) Hi, I think I have found a small bug with the command line argument handling. OCaml 3.00 shifts the Sys.argv command line arguments when invoked as script: ocaml <scriptname> a0 a1 ... The script sees Sys.argv.(0) = "<scriptname>"; Sys.argv.(1) = a0 etc. Well done. But Arg.current is not adjusted; it contains still the number of already parsed arguments (here, !Arg.current = 1). I think that Arg.current must be re-initialized to 0 after the arguments have been shifted, otherwise the first argument(s) will be skipped if the Arg module is used to parse the remaining arguments. In this example, a1 is the first argument which is parsed by Arg. Gerd | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Notes |
|
|
(0000393) administrator (administrator) 2000-05-22 03:01 |
> Full_Name: Gerd Stolpmann > > I think I have found a small bug with the command line argument handling. > OCaml 3.00 shifts the Sys.argv command line arguments when invoked as > script: > > ocaml <scriptname> a0 a1 ... > > The script sees Sys.argv.(0) = "<scriptname>"; Sys.argv.(1) = a0 etc. > Well done. But Arg.current is not adjusted; it contains still the > number of already parsed arguments (here, !Arg.current = 1). I think > that Arg.current must be re-initialized to 0 after the arguments have > been shifted, otherwise the first argument(s) will be skipped if the > Arg module is used to parse the remaining arguments. In this example, > a1 is the first argument which is parsed by Arg. Thank you for your accurate correction. This will be changed immediately. Jacques |
|
(0000394) administrator (administrator) 2000-05-24 03:36 |
Fixed on 2000-05-22 by Jacques |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2005-11-18 10:13 | administrator | New Issue | |
| Copyright © 2000 - 2011 MantisBT Group |