Browse Source

docs: use assignment operators

assignment-operators
Garrit Franke 3 years ago
parent
commit
ee1ec34522
  1. 2
      docs/concepts/control-flow.md
  2. 4
      examples/bubblesort.sb
  3. 2
      lib/stdio.sb
  4. 2
      src/parser/tests.rs

2
docs/concepts/control-flow.md

@ -113,7 +113,7 @@ fn main() {
while index < 5 {
println("the value is: " + a[index])
index = index + 1
index += 1
}
}
```

4
examples/bubblesort.sb

@ -14,10 +14,10 @@ fn main() {
arr[d+1] = swap
}
d = d + 1
d += 1
}
c = c + 1
c += 1
}
println(arr)

2
lib/stdio.sb

@ -13,7 +13,7 @@ fn println(msg: string) {
fn len(arr: int[]): int {
let c: int = 0
while arr[c] {
c = c + 1
c += 1
}
return c

2
src/parser/tests.rs

@ -463,7 +463,7 @@ fn test_array_access_in_loop() {
while i < 5 {
println(x[i])
i = i + 1
i += 1
}
}
";

Loading…
Cancel
Save