From df78b8ad3ebd263849eee6736fd78efe017522a4 Mon Sep 17 00:00:00 2001 From: Ginger Bill Date: Mon, 6 Feb 2017 21:31:27 +0000 Subject: Make checking map key exists optional --- code/demo.odin | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'code') diff --git a/code/demo.odin b/code/demo.odin index c4e44aebd..90ac11858 100644 --- a/code/demo.odin +++ b/code/demo.odin @@ -18,14 +18,14 @@ main :: proc() { m["a"] = 56; m["b"] = 13453; m["c"] = 7654; - c, ok := m["c"]; + c := m["c"]; + _, ok := m["c"]; assert(ok && c == 7654); for val, key in m { fmt.printf("m[\"%s\"] == %v\n", key, val); } - // fm: map[128, int]f32; /* -- cgit v1.2.3