From d2f9d208330e692f29a2b48dce62a9c5bcab6031 Mon Sep 17 00:00:00 2001 From: Ginger Bill Date: Sat, 18 Feb 2017 10:41:48 +0000 Subject: Change ternary expression precedence --- code/demo.odin | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'code') diff --git a/code/demo.odin b/code/demo.odin index a3fee1555..34274cb22 100644 --- a/code/demo.odin +++ b/code/demo.odin @@ -5,12 +5,10 @@ #import "mem.odin"; #import "opengl.odin"; #import "os.odin"; -#import "utf8.odin"; +#import "halloc.odin"; main :: proc() { - x: f32 = false ? 123 : 55; - fmt.println("Ternary:", x); /* /* Version 0.1.1 @@ -29,6 +27,7 @@ main :: proc() { * immutable variables are "completely immutable" - rules need a full explanation * `slice_to_bytes` - convert any slice to a slice of bytes * `union_cast` allows for optional ok check + * ?: ternary operator Removed: * Maybe/option types -- cgit v1.2.3