Skip to content

Commit

Permalink
Fix various typos in doc (#1134)
Browse files Browse the repository at this point in the history
  • Loading branch information
yannickmoy committed Feb 26, 2021
1 parent b499f06 commit 87e6bcf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions docs/DafnyRef/Statements.md
Expand Up @@ -450,14 +450,14 @@ A RHS with a method call cannot be mixed with a RHS containing multiple expressi
For example, the desugaring of
```dafny
method m(Status r) returns (rr: Status) {
var j, k;
j, k :- r, 7;
var k;
k :- r, 7;
...
}
```
is
```dafny
var j, k;
var k;
var tmp;
tmp, k := r, 7;
if tmp.IsFailure() {
Expand Down Expand Up @@ -1010,10 +1010,10 @@ method Sum(x: Tree) returns (r: int)
{
match x {
case Empty => r := 0;
case Node(t1, d, t2) =>
var v1 := Sum(t1);
var v2 := Sum(t2);
r := v1 + d + v2;
case Node(t1, d, t2) =>
var v1 := Sum(t1);
var v2 := Sum(t2);
r := v1 + d + v2;
}
}
```
Expand Down
4 changes: 2 additions & 2 deletions docs/QuickReference.md
Expand Up @@ -83,7 +83,7 @@ This can be made clearer in the program text by declaring the method with `lemma

Here is an example method that takes 3 integers as in-parameters and returns these in 3 out-parameters in sorted order:
```
method Sort(a: int b: int, c: int) returns (x: int, y: int, z: int)
method Sort(a: int, b: int, c: int) returns (x: int, y: int, z: int)
ensures x <= y <= z && multiset{a, b, c} == multiset{x, y, z}
{
x, y, z := a, b, c;
Expand Down Expand Up @@ -324,7 +324,7 @@ Finally, to make a sequence from some elements, enclose them in square brackets.
For example, `[x,y]` is the sequence consisting of the two elements `x` and `y` such that `[x,y][0] == x` and `[x,y][1] == y`, `[x]` is the singleton sequence whose only element is `x`, and `[]` is the empty sequence.


The if-then-else expression has the form: `if BoolExpr then Expr0 else Else1`
The if-then-else expression has the form: `if BoolExpr then Expr0 else Expr1`

where Expr0 and Expr1 are any expressions of the same type.
Unlike the if statement, the if-then-else expression uses the `then` keyword, and must include an explicit `else` branch.
Expand Down

0 comments on commit 87e6bcf

Please sign in to comment.