From c5d20d2eef6c25b23c2aa69cdc1dbc7ce7d6753a Mon Sep 17 00:00:00 2001 From: Ginger Bill Date: Fri, 7 Oct 2016 09:41:38 +0100 Subject: Demaybe operator ? --- code/demo.odin | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'code') 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") -- cgit v1.2.3