aboutsummaryrefslogtreecommitdiff
path: root/code
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-02-07 18:13:37 +0000
committerGinger Bill <bill@gingerbill.org>2017-02-07 18:13:37 +0000
commit454d0b5cf5b109fda01b3380b1fab0434d7ff51d (patch)
tree190c1793b3ded1976a30ba16f380bd5a0b5d54b1 /code
parent219ca0ac4677235d595d9bd6e1be08eedfdf7d66 (diff)
Fix global maps and initialize the preload types before
Diffstat (limited to 'code')
-rw-r--r--code/demo.odin12
1 files changed, 9 insertions, 3 deletions
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{