Skip to content

Commit 7a32196

Browse files
Fix typos in Reference Manual
Co-authored-by: Maria Scott <maria-12648430@hnc-agency.org>
1 parent 6189ca0 commit 7a32196

18 files changed

Lines changed: 240 additions & 240 deletions

system/doc/reference_manual/character_set.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ limitations under the License.
2323

2424
## Character Set
2525

26-
The syntax of Erlang tokens allow the use of the full ISO-8859-1 (Latin-1)
26+
The syntax of Erlang tokens allows the use of the full ISO-8859-1 (Latin-1)
2727
character set. This is noticeable in the following ways:
2828

2929
- All the Latin-1 printable characters can be used and are shown without the

system/doc/reference_manual/code_loading.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Erlang/OTP with references to relevant parts of the documentation.
2929

3030
Erlang programs must be _compiled_ to object code. The compiler can generate a
3131
new file that contains the object code. The current abstract machine, which runs
32-
the object code, is called BEAM, therefore the object files get the suffix
32+
the object code, is called BEAM and therefore the object files get the suffix
3333
`.beam`. The compiler can also generate a binary which can be loaded directly.
3434

3535
The compiler is located in the module `m:compile` in Compiler.
@@ -53,7 +53,7 @@ The compiler can also be accessed from the OS prompt using the
5353
% erl -make
5454
```
5555

56-
The `erlc` program provides way to compile modules from the OS
56+
The `erlc` program provides a way to compile modules from the OS
5757
shell, see the [erlc](`e:erts:erlc_cmd.md`) executable in ERTS. It
5858
understands a number of flags that can be used to define macros, add search
5959
paths for include files, and more.
@@ -73,7 +73,7 @@ The code server loads code according to a code loading strategy, which is either
7373
_interactive_ (default) or _embedded_. In interactive mode, code is searched for
7474
in a _code path_ and loaded when first referenced. In embedded mode, code is
7575
loaded at start-up according to a _boot script_. This is described in
76-
[System Principles ](`e:system:system_principles.md#code_loading`).
76+
[System Principles](`e:system:system_principles.md#code_loading`).
7777

7878
## Code Replacement
7979

@@ -85,12 +85,12 @@ When a module is loaded into the system for the first time, the code becomes
8585
'current'. If then a new instance of the module is loaded, the code of the
8686
previous instance becomes 'old' and the new instance becomes 'current'.
8787

88-
Both old and current code is valid, and can be evaluated concurrently. Fully
88+
Both old and current code are valid, and can be evaluated concurrently. Fully
8989
qualified function calls always refer to current code. Old code can still be
9090
evaluated because of processes lingering in the old code.
9191

9292
If a third instance of the module is loaded, the code server removes (purges)
93-
the old code and any processes lingering in it is terminated. Then the third
93+
the old code and any processes lingering in it are terminated. Then the third
9494
instance becomes 'current' and the previously current code becomes 'old'.
9595

9696
To change from old code to current code, a process must make a fully qualified
@@ -147,7 +147,7 @@ and can be called until the `on_load` function has returned. If the `on_load`
147147
function fails, the current code (if any) will remain current. If there is no
148148
current code for a module, any process that makes an external call to the module
149149
before the `on_load` function has finished will be suspended until the `on_load`
150-
function have finished.
150+
function has finished.
151151

152152
> #### Change {: .info }
153153
>
@@ -172,4 +172,4 @@ load_my_nifs() ->
172172
```
173173

174174
If the call to `erlang:load_nif/2` fails, the module is unloaded and a warning
175-
report is sent to the error loader.
175+
report is sent to the error logger.

system/doc/reference_manual/data_types.md

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ Erlang provides a number of data types, which are listed in this section.
2525

2626
[](){: #no_user_types }
2727

28-
Note that Erlang has no user defined types, only composite types (data
28+
Note that Erlang has no user-defined types, only composite types (data
2929
structures) made of Erlang terms. This means that any function testing for a
3030
composite type, typically named `is_type/1`, might return `true` for a term that
31-
coincides with the chosen representation. The corresponding functions for built
32-
in types do not suffer from this.
31+
coincides with the chosen representation. The corresponding functions for built-in
32+
types do not suffer from this.
3333

3434
## Terms
3535

@@ -38,26 +38,26 @@ A piece of data of any data type is called a _term_.
3838
## Number
3939

4040
There are two types of numeric literals, _integers_ and _floats_. Besides the
41-
conventional notation, there are two Erlang-specific notations:
41+
conventional notation, there are three Erlang-specific notations:
4242

4343
- `$`_`char`_
44-
ASCII value or unicode code-point of the character _`char`_.
44+
ASCII value or Unicode code-point of the character _`char`_.
4545
- _`base`_`#`_`digits`_
4646
Integer with the base _`base`_, which must be an integer in the range 2
47-
through 36. _`digits`_ are `0`-`9` plus letters `A`-`Z` (upper or lower case).
47+
through 36. _`digits`_ are `0`-`9` plus letters `A`-`Z` (upper- or lowercase).
4848
This notation can also be found in the Ada programming
4949
language. Erlang does _not_ support prefixes such as `0x` for hexadecimal
5050
or `077` for octal.
5151
- _`base`_`#`_`digits`_`.`_`digits`_`#e`_`exponent`_
52-
Based floating point number, for example `16#ff.fe#e+6`. Using a base
53-
like 16 or 2 allows for an exact text representation of a floating
54-
point number. Like the base, the exponent is always a decimal number.
52+
Based floating-point number, for example `16#ff.fe#e+6`. Using a base
53+
like 16 or 2 allows for an exact text representation of a floating-point
54+
number. Like the base, the exponent is always a decimal number.
5555

5656

5757
Leading zeroes are ignored. Single underscore characters (`_`) can be
5858
inserted between digits as a visual separator.
5959

60-
Also note that floating point numbers must start with a digit, and must
60+
Also note that floating-point numbers must start with a digit, and must
6161
contain a `.`. In other words, literals such as `.01` and `1e6` are not
6262
allowed, and must be written `0.01` and `1.0e6` respectively.
6363

@@ -99,7 +99,7 @@ than `2.4`, `3` compares greater than `2.99999`, and `5` is equal to `5.0`.
9999

100100
When wanting to compare an integer with another integer or a float with another
101101
float, it may be tempting to use the term equivalence operators (`=:=`, `=/=`)
102-
or pattern matching. This works for integers which has a distinct representation
102+
or pattern matching. This works for integers which have a distinct representation
103103
for every number, but there's a surprising edge case for floating-point as the
104104
latter has two representations for zero which are considered different by the
105105
term equivalence operators and pattern matching.
@@ -137,9 +137,9 @@ false
137137
true
138138
```
139139

140-
### Representation of Floating Point Numbers
140+
### Representation of Floating-Point Numbers
141141

142-
When working with floats you may not see what you expect when printing or doing
142+
When working with floats, you may not see what you expect when printing or doing
143143
arithmetic operations. This is because floats are represented by a fixed number
144144
of bits in a base-2 system while printed floats are represented with a base-10
145145
system. Erlang uses 64-bit floats. Here are examples of this phenomenon:
@@ -164,7 +164,7 @@ Erlang's pretty printer rounds `36028797018963968.0` to `3.602879701896397e16`
164164
`[36028797018963966.0, 36028797018963972.0]` are represented by
165165
`36028797018963968.0`.
166166

167-
For more information about floats and issues with them see:
167+
For more information about floats and issues with them, see:
168168

169169
- [What Every Programmer Should Know About Floating-Point Arithmetic](https://floating-point-gui.de/)
170170
- [0\.30000000000000004.com/](https://0.30000000000000004.com/)
@@ -194,9 +194,9 @@ _Examples_:
194194

195195
## Atom
196196

197-
An atom is a literal, a constant with name. An atom is to be enclosed in single
198-
quotes (`'`) if it does not begin with a lower-case letter or if it contains other
199-
characters than alphanumeric characters, underscore (`_`), or `@`.
197+
An atom is a literal, a constant with a name. An atom is to be enclosed in single
198+
quotes (`'`) if it does not begin with a lowercase letter or if it contains
199+
characters other than alphanumeric characters, underscore (`_`), or `@`.
200200

201201
_Examples:_
202202

@@ -266,7 +266,7 @@ true
266266
## Fun
267267

268268
A fun is a functional object. Funs make it possible to create an anonymous
269-
function and pass the function itself — not its name — as argument to other
269+
function and pass the function itself — not its name — as an argument to other
270270
functions.
271271

272272
_Examples:_
@@ -279,7 +279,7 @@ _Examples:_
279279
```
280280

281281
The [`is_function/1`](`erlang:is_function/1`) and [`is_function/2`](`erlang:is_function/2`)
282-
BIFs tests whether a term is a fun.
282+
BIFs test whether a term is a fun.
283283

284284
_Examples_:
285285

@@ -319,7 +319,7 @@ The BIF [`self/0`](`erlang:self/0`) returns the Pid of the calling process. When
319319
process will be able to get the Pid of the child process either via the return
320320
value, as is the case when calling the [`spawn/3`](`erlang:spawn/3`) BIF, or via
321321
a message, which is the case when calling the
322-
[`spawn_request/5`](`erlang:spawn_request/5`) BIF. A Pid is typically used when
322+
[`spawn_request/5`](`erlang:spawn_request/5`) BIF. A Pid is typically used
323323
when sending a process a [signal](ref_man_processes.md#signals). The
324324
[`is_pid/1`](`erlang:is_pid/1`) BIF tests whether a term is a Pid.
325325

@@ -356,7 +356,7 @@ A tuple is a compound data type with a fixed number of terms:
356356
Each term `Term` in the tuple is called an _element_. The number of elements is
357357
said to be the _size_ of the tuple.
358358

359-
There exists a number of BIFs to manipulate tuples.
359+
There are a number of BIFs to manipulate tuples.
360360

361361
_Examples:_
362362

@@ -389,7 +389,7 @@ Each key-value association in the map is called an _association pair_. The key
389389
and value parts of the pair are called _elements_. The number of association
390390
pairs is said to be the _size_ of the map.
391391

392-
There exists a number of BIFs to manipulate maps.
392+
There are a number of BIFs to manipulate maps.
393393

394394
_Examples:_
395395

@@ -402,13 +402,13 @@ adam
402402
{july,29}
403403
4> M2 = maps:update(age, 25, M1).
404404
#{age => 25,date => {july,29},name => adam}
405-
5> map_size(M).
405+
5> map_size(M1).
406406
3
407407
6> map_size(#{}).
408408
0
409409
```
410410

411-
A collection of maps processing functions are found in module `m:maps`
411+
A collection of map-processing functions can be found in the module `m:maps`
412412
in STDLIB.
413413

414414
Read more about maps in [Map Expressions](expressions.md#map-expressions).
@@ -432,7 +432,7 @@ said to be the _length_ of the list.
432432
Formally, a list is either the empty list `[]` or consists of a _head_ (first
433433
element) and a _tail_ (remainder of the list). The _tail_ is also a list. The
434434
latter can be expressed as `[H|T]`. The notation `[Term1,...,TermN]` above is
435-
equivalent with the list `[Term1|[...|[TermN|[]]]]`.
435+
equivalent to the list `[Term1|[...|[TermN|[]]]]`.
436436

437437
_Example:_
438438

@@ -464,16 +464,16 @@ a
464464
0
465465
```
466466

467-
A collection of list processing functions are found in module
467+
A collection of list-processing functions can be found in the module
468468
`m:lists` in STDLIB.
469469

470470
## String
471471

472-
Strings are enclosed in double quotes ("), but is not a data type in Erlang.
472+
Strings are enclosed in double quotes ("), but are not a data type in Erlang.
473473
Instead, a string `"hello"` is shorthand for the list `[$h,$e,$l,$l,$o]`, that
474474
is, `[104,101,108,108,111]`.
475475

476-
Two adjacent string literals are concatenated into one. This is done in the
476+
Two adjacent string literals are concatenated into one. This is done during
477477
compilation.
478478

479479
_Example:_
@@ -490,7 +490,7 @@ is equivalent to
490490

491491
> #### Change {: .info }
492492
>
493-
> Starting with Erlang/OTP 27 two adjacent string literals have to be separated
493+
> Starting with Erlang/OTP 27, two adjacent string literals have to be separated
494494
> by white space, or otherwise it is a syntax error. This avoids possible confusion
495495
> with _triple-quoted strings_.
496496
@@ -501,11 +501,11 @@ sequences, and thereby do not need double quote characters to be escaped.
501501

502502
> #### Change {: .info }
503503
>
504-
> Triple-quoted strings were added in Erlang/OTP 27. Before that 3 consecutive
505-
> double quote characters had a different meaning. There were absolutely no good
504+
> Triple-quoted strings were added in Erlang/OTP 27. Before that, 3 consecutive
505+
> double quote characters had a different meaning. There was absolutely no good
506506
> reason to write such a character sequence before triple-quoted strings
507507
> existed, but there _are_ some gotchas; see the
508-
> [Warning ](data_types.md#triple-quoted-strings-warning) at the end of this
508+
> [Warning](data_types.md#triple-quoted-strings-warning) at the end of this
509509
> description of triple-quoted strings.
510510
511511
Example, with verbatim double quote characters:
@@ -517,15 +517,15 @@ Example, with verbatim double quote characters:
517517
"""
518518
```
519519

520-
That is equivalent to the normal single quoted string (which also allows
520+
That is equivalent to a normal single-quoted string (which also allows
521521
newlines):
522522

523523
```text
524524
"Line \"1\"
525525
Line \"2\""
526526
```
527527

528-
The opening and the closing line has got the delimiters: the `"""` characters.
528+
The opening and closing lines contain the delimiters, the `"""` characters.
529529
The lines between them are the content lines. The newline on the opening line is
530530
not regarded as string content, nor is the newline on the last content line.
531531

@@ -601,7 +601,7 @@ These strings are all the empty string:
601601
> strings.
602602
>
603603
> The compiler preprocessor was patched in Erlang/OTP 26.1 to warn about 3 or
604-
> more sequential double quote characters. In Erlang/OTP 26.2 this was improved
604+
> more sequential double quote characters. In Erlang/OTP 26.2, this was improved
605605
> to warn about adjacent string literals without intervening white space, which
606606
> also covers the same problem at a string end.
607607
>
@@ -618,7 +618,7 @@ offer mainly two things: a compact way to create UTF-8 encoded binary strings,
618618
and a way to write verbatim strings (not having to escape `\` characters),
619619
useful for regular expressions, for example.
620620

621-
A sigil starts with the Tilde character (`~`) followed by a name defining the
621+
A sigil starts with the tilde character (`~`) followed by a name defining the
622622
sigil type.
623623

624624
Immediately after follows the sigil content; a character sequence between
@@ -627,19 +627,19 @@ content delimiters. The allowed delimiters are these start-end delimiter pairs:
627627
``/ | ' " ` #``. [Triple-quote](data_types.md#tqstring) string delimiters may
628628
also be used.
629629

630-
The [character escaping rules ](data_types.md#escape-sequences)for the sigil
631-
content depends on the sigil type. When the sigil content is _verbatim_, there
630+
The [character escaping rules](data_types.md#escape-sequences) for the sigil
631+
content depend on the sigil type. When the sigil content is _verbatim_, there
632632
is no escape character. The sigil content simply ends when the end delimiter is
633633
found, so it is impossible to have the end delimiter character in the string
634634
content. The set of delimiters is fairly generous, and in most cases it is
635635
possible to choose an end delimiter that's not in the literal string content.
636636

637637
[Triple-quote](data_types.md#tqstring) string delimiters allow choosing a larger
638-
number of quote characters in the end delimiter, than whatever is in the string
638+
number of quote characters in the end delimiter than whatever is in the string
639639
content, which thereby facilitates any content also with a sequence of `"`
640640
characters at the start of a line even for a _verbatim_ string.
641641

642-
The Sigils are:
642+
The sigils are:
643643

644644
- **`~`** - The Vanilla (default) Sigil. Shorthand for a UTF-8 encoded
645645
`t:binary/0`. This sigil does not affect the character escaping rules, so with
@@ -648,7 +648,7 @@ The Sigils are:
648648

649649
- **`~b`** - The Binary Sigil. Shorthand for a
650650
[UTF-8 encoded `binary()`](`t:unicode:unicode_binary/0`), as if calling
651-
[`unicode:characters_to_binary/1` ](`unicode:characters_to_binary/1`)on the
651+
[`unicode:characters_to_binary/1`](`unicode:characters_to_binary/1`) on the
652652
sigil content. Character escaping rules are the same as for `~s`.
653653

654654
- **`~B`** - The Verbatim Binary Sigil. As `~b`, but the sigil content is
@@ -657,7 +657,7 @@ The Sigils are:
657657
- **`~s`** - The String Sigil. Shorthand for a
658658
[`string()`](`t:erlang:string/0`), that is, a `[char()]` which is a list of
659659
Unicode codepoints.
660-
[Character escaping rules ](data_types.md#escape-sequences)are the same as for
660+
[Character escaping rules](data_types.md#escape-sequences) are the same as for
661661
a normal `t:string/0`. Using this sigil on a regular string does effectively
662662
nothing.
663663

@@ -692,15 +692,15 @@ Examples
692692
""" = "\"\\µA\""
693693
```
694694

695-
Adjacent strings are concatenated in the compilation, but that is not possible
695+
Adjacent strings are concatenated during compilation, but that is not possible
696696
with sigils, since they are transformed into terms that in general may not be
697697
concatenated. So, `"a" "b"` is equivalent to `"ab"`, but `~s"a" "b"` or
698698
`~s"a" ~s"b"` is a syntax error. `~s"a" ++ "b"`, however, evaluates to `"ab"`
699699
since both operands to the `++` operator are strings.
700700

701701
> #### Change {: .info }
702702
>
703-
> Sigils were introduced in Erlang/OTP 27
703+
> Sigils were introduced in Erlang/OTP 27.
704704
705705
## Record
706706

@@ -770,7 +770,7 @@ false
770770
771771
## Boolean
772772

773-
There is no Boolean data type in Erlang. Instead the atoms `true` and `false`
773+
There is no Boolean data type in Erlang. Instead, the atoms `true` and `false`
774774
are used to denote Boolean values. The [`is_boolean/1`](`erlang:is_boolean/1`)
775775
BIF tests whether a term is a boolean.
776776

@@ -838,8 +838,8 @@ or above is allowed for the start delimiter and the end delimiter is the same as
838838
the start delimiter.
839839

840840
When triple-quote string delimiters are used with the
841-
[`~`, `~B` or `~S` sigils ](data_types.md#sigil)the same applies, but for the
842-
[`~b` or `~s` sigils ](data_types.md#sigil)the escape sequences for normal
841+
[`~`, `~B` or `~S` sigils](data_types.md#sigil) the same applies, but for the
842+
[`~b` or `~s` sigils](data_types.md#sigil) the escape sequences for normal
843843
strings, above, are used.
844844

845845
> #### Change {: .info }

0 commit comments

Comments
 (0)