range statement

This commit is contained in:
Ginger Bill
2017-01-02 18:47:47 +00:00
parent ce89a1428e
commit a3883a178c
9 changed files with 462 additions and 75 deletions

View File

@@ -18,5 +18,12 @@ Thing :: enum f64 {
}
main :: proc() {
fmt.println(Thing.A, Thing.B, Thing.C, Thing.D);
msg := "Hello";
range index, value : msg {
fmt.println(index, value);
}
list := []int{1, 4, 7, 3, 7, 2, 1};
range index, value : list {
fmt.println(index, value);
}
}