Map type info and fmt printing

This commit is contained in:
Ginger Bill
2017-02-07 00:10:58 +00:00
parent 5796c41357
commit 219ca0ac46
7 changed files with 139 additions and 52 deletions

View File

@@ -12,7 +12,7 @@
main :: proc() {
{
m := map[f32]int{};
m: map[f32]int;
reserve(^m, 16);
defer free(m);
@@ -39,9 +39,7 @@ main :: proc() {
_, ok := m["c"];
assert(ok && c == 7654);
for val, key in m {
fmt.printf("m[\"%s\"] == %v\n", key, val);
}
fmt.println(m);
}