Skip to content

Commit c7e0ddf

Browse files
minor grammar
1 parent 5fe5e41 commit c7e0ddf

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

data/cookbook/parse-command-line-arguments/00-stdlib.ml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ discussion: |
44
For a longer introduction, see the [Command-line arguments](https://ocaml.org/docs/cli-arguments) tutorial in the docs.
55
The standard library documents the [Arg module](https://ocaml.org/manual/latest/api/Arg.html).
66
---
7-
(* At the lowest-level we can interact with `Sys.argv` and access arguments by index.
7+
(* At the lowest level, we can interact with `Sys.argv` and access arguments by index.
88
99
With this approach all our error checking will have to be entirely manual.
10-
If we pass a non-numeric first argument then `int_of_string` raises an exception.
10+
If we pass a non-numeric first argument, then `int_of_string` raises an exception.
1111
A leading dash on our second argument will just be treated as part of the
1212
name - there is no option handling here.
1313
*)
@@ -28,16 +28,16 @@ let () =
2828
interface than `Sys.argv`. It is a good choice for basic command-line
2929
applications.
3030
31-
We can handle options with values and repeating positional arguments too.
31+
We can handle options with values and repeating positional arguments, too.
3232
It also automatically provides a `--help` option to our application.
3333
3434
The `Arg` module is quite imperative and updates references to a value.
3535
Typically we initialise each option with a default value ("en", 1 etc).
3636
37-
To handle multiple positional (anonymous) arguments we need a function like
37+
To handle multiple positional (anonymous) arguments, we need a function like
3838
`record_anon_arg` to construct a list or otherwise accumulate each item.
3939
40-
With `speclist` we define the arguments we will parse.
40+
With `speclist`, we define the arguments we will parse.
4141
Each argument needs the option-characters themselves, the action that will
4242
be run when matched and a short explanatory piece of text.
4343

0 commit comments

Comments
 (0)