aboutsummaryrefslogtreecommitdiff
path: root/code
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-02-19 11:50:42 +0000
committerGinger Bill <bill@gingerbill.org>2017-02-19 11:50:42 +0000
commit3cec2550d9b15eb56b8dd1b42a30b9f47ace0b4c (patch)
treebe46857c9738764df840e621c1a371eb21105388 /code
parent758dd9ba16a2dc5b01ea131e83c06bf33c33f116 (diff)
`delete` for maps
Diffstat (limited to 'code')
-rw-r--r--code/demo.odin7
1 files changed, 7 insertions, 0 deletions
diff --git a/code/demo.odin b/code/demo.odin
index dc93ab9e9..b8bf9bf6d 100644
--- a/code/demo.odin
+++ b/code/demo.odin
@@ -8,6 +8,13 @@
#import "halloc.odin";
main :: proc() {
+
+ m: map[int]int;
+ m[123] = 312;
+ fmt.println(m[123]);
+ delete(m, 123);
+ fmt.println(m[123]);
+
/*
/*
Version 0.1.1