Fixed documentation.

There was an error in the syntax of tuple projection (no parentheses
are needed, in fact).

Another issue was a wrong Markdown layout for lists (my fault).
This commit is contained in:
Christian Rinderknecht 2019-10-16 11:50:31 +02:00
parent 15937a2459
commit 157e24ff08

View File

@ -332,15 +332,15 @@ There are three kinds of native numerical types in PascaLIGO: `int`,
other, for example `00` is invalid. Also, for the sake of convenience, other, for example `00` is invalid. Also, for the sake of convenience,
underscores are allowed in the literals, like `1_000_000`. underscores are allowed in the literals, like `1_000_000`.
* The second numerical type is the type of the natural numbers, * The second numerical type is the type of the natural numbers, e.g.,
e.g., `0n` or `13n`. Note that the `nat` literals must be annotated `0n` or `13n`. Note that the `nat` literals must be annotated with the
with the suffix `n`, which distinguishes them from `int` literals. The suffix `n`, which distinguishes them from `int` literals. The same
same convenient use of underscores as with integer literals is allowed convenient use of underscores as with integer literals is allowed too
too and the canonical form of zero is `0n`. and the canonical form of zero is `0n`.
* The last kind of native numerical type is `tez`, which is a unit * The last kind of native numerical type is `tez`, which is a unit of
of measure of the amounts (fees, accounts). Beware: the literals of measure of the amounts (fees, accounts). Beware: the literals of the
the type `tez` are annotated with the suffix `mtz`, which stands for type `tez` are annotated with the suffix `mtz`, which stands for
millionth of Tez, for instance, `0mtz` or `1200000mtz`. The same handy millionth of Tez, for instance, `0mtz` or `1200000mtz`. The same handy
use of underscores as in natural literals help in the writing, like use of underscores as in natural literals help in the writing, like
`1_200_000mtz`. `1_200_000mtz`.
@ -533,14 +533,13 @@ in terse style (see section "Predefined types and values/Lists").
Given a tuple `t` with _n_ components, the `i`th component is Given a tuple `t` with _n_ components, the `i`th component is
t.(i) t.i
where `t.(0)` is the first component. For example, given the where `t.0` is the first component. For example, given the declaration
declaration
const t : int * string = (4, "four") const t : int * string = (4, "four")
the expression `t.(1)` has the value `"four"`. the expression `t.1` has the value `"four"`.
#### Records #### Records