diff options
Diffstat (limited to 'docs/LEARN.md')
| -rw-r--r-- | docs/LEARN.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/LEARN.md b/docs/LEARN.md index e4fcdc6..6f3e0fc 100644 --- a/docs/LEARN.md +++ b/docs/LEARN.md @@ -63,7 +63,7 @@ hello, world! ### variables and while -`let` infers a variable's type from its initializer. an integer literal stays a plain word. `int i = 0;` writes the type explicitly. a local must be assigned on every path before it is read (locals are not zeroed); passing `&x` counts as initializing `x`, and an array or struct needs a full `{...}` initializer or `&agg`. the lifetime analyzer runs by default; the optional typechecker is enabled separately with `typecheck on;`. +`let` infers a variable's type from its initializer. an integer literal stays a plain word. `int i = 0;` writes the type explicitly. a local must be assigned on every path before it is read (locals are not zeroed); passing `&x` counts as initializing `x`, and an array or struct is set once every field or constant-index element is written, by a `{...}` initializer, by `&agg`, or by a computed-index fill such as `a[i] = e` in a loop; reading a part that was written is fine. the lifetime analyzer runs by default; the optional typechecker is enabled separately with `typecheck on;`. `while` tests before entering the body. `i++` increments the variable, and `break` leaves the loop. |
