From 454d0b5cf5b109fda01b3380b1fab0434d7ff51d Mon Sep 17 00:00:00 2001 From: Ginger Bill Date: Tue, 7 Feb 2017 18:13:37 +0000 Subject: Fix global maps and initialize the preload types before --- code/demo.odin | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'code') diff --git a/code/demo.odin b/code/demo.odin index 45ae781a2..bc193ef1f 100644 --- a/code/demo.odin +++ b/code/demo.odin @@ -9,7 +9,6 @@ #import "utf8.odin"; #import ht "http_test.odin"; - main :: proc() { { m: map[f32]int; @@ -21,11 +20,18 @@ main :: proc() { m[3.0] = 564; c := m[3.0]; _, ok := m[3.0]; - assert(ok && c == 564); + // assert(ok && c == 564); + fmt.print("map["); + i := 0; for val, key in m { - fmt.printf("m[%f] == %v\n", key, val); + if i > 0 { + fmt.print(", "); + } + fmt.printf("%f=%v", key, val); + i += 1; } + fmt.println("]"); } { m := map[string]u32{ -- cgit v1.2.3