diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-02-07 00:10:58 +0000 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-02-07 00:10:58 +0000 |
| commit | 219ca0ac4677235d595d9bd6e1be08eedfdf7d66 (patch) | |
| tree | 453fc6cb9bd0e8ecc0952cde48994b67b779c08d /code | |
| parent | 5796c413571140798d9ca597cda4d34c6762eabe (diff) | |
Map type info and fmt printing
Diffstat (limited to 'code')
| -rw-r--r-- | code/demo.odin | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/code/demo.odin b/code/demo.odin index d91d1d5c7..45ae781a2 100644 --- a/code/demo.odin +++ b/code/demo.odin @@ -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); } |