aboutsummaryrefslogtreecommitdiff
path: root/code
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2016-10-07 09:41:38 +0100
committerGinger Bill <bill@gingerbill.org>2016-10-07 09:41:38 +0100
commitc5d20d2eef6c25b23c2aa69cdc1dbc7ce7d6753a (patch)
tree23c6a0a5badbf67634a000df4d856f384fc51176 /code
parentf40482aa29f687b4630744457844bad7f45ec614 (diff)
Demaybe operator ?
Diffstat (limited to 'code')
-rw-r--r--code/demo.odin3
1 files changed, 2 insertions, 1 deletions
diff --git a/code/demo.odin b/code/demo.odin
index 9b9566faa..786392b77 100644
--- a/code/demo.odin
+++ b/code/demo.odin
@@ -1,8 +1,9 @@
#import "fmt.odin"
+
main :: proc() {
maybe_print :: proc(x: ?int) {
- if v, ok := maybe_value(x); ok {
+ if v, ok := x?; ok {
fmt.println(v)
} else {
fmt.println("nowt")