Skip to content

Commit

Permalink
fix typos in arrays.md and functions.md
Browse files Browse the repository at this point in the history
  • Loading branch information
burningbuffer authored and lerno committed Dec 23, 2024
1 parent aeae054 commit 192be46
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/content/docs/Language Common/arrays.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,8 @@ fn void test()
{
io::printn(str); // Prints "Hello", then "World"
}
String str = list[1]; // str == "World"
list.free(); // Free all memory associated with list.
String str = list_str[1]; // str == "World"
list_str.free(); // Free all memory associated with list.
}
```

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/Language Fundamentals/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ fn int test_example(int bar)

In this case the compiler can look at the post condition of `result > 0` to determine that `testFoo(foo) == 0` must always be false.

Looking closely at this code, we not that nothing guarantees that `bar` is not violating the preconditions. In Safe builds this will usually be checked in runtime, but a sufficiently smart compiler will warn about the lack of checks on `bar`. Execution of code violating pre and post conditions has unspecified behaviour.
Looking closely at this code, we note that nothing guarantees that `bar` is not violating the preconditions. In Safe builds this will usually be checked in runtime, but a sufficiently smart compiler will warn about the lack of checks on `bar`. Execution of code violating pre and post conditions has unspecified behaviour.

## Short function declaration syntax

Expand Down

0 comments on commit 192be46

Please sign in to comment.