mutable decl syntax change
This commit is contained in:
@@ -2,11 +2,11 @@ Point :: struct {
|
||||
x i32
|
||||
}
|
||||
|
||||
counter int = 0
|
||||
ratio float = 1
|
||||
span range = 0..2
|
||||
point Point = Point { x = 1 }
|
||||
values [_]mut i32 = [10, 20]
|
||||
counter := i32(0)
|
||||
ratio := 1.0
|
||||
span := 0..2
|
||||
point Point := Point { x = 1 }
|
||||
values [_]mut i32 := [10, 20]
|
||||
|
||||
bump func(value @mut i32) void {
|
||||
value^ += 1
|
||||
@@ -19,7 +19,7 @@ main func() i32 {
|
||||
point.x += counter
|
||||
values[1] = point.x
|
||||
|
||||
total i32 = counter + point.x + values[1]
|
||||
total i32 := counter + point.x + values[1]
|
||||
for span |i| {
|
||||
total += i
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user