From d0e1efe622f921fd763f5d88cc5011e940f0c9cd Mon Sep 17 00:00:00 2001 From: Ginger Bill Date: Tue, 20 Dec 2016 18:58:17 +0000 Subject: Generic (grouped) declarations: var, let, const, type, import, include --- code/demo.odin | 39 +++++++++++++++++---------------------- 1 file changed, 17 insertions(+), 22 deletions(-) (limited to 'code') diff --git a/code/demo.odin b/code/demo.odin index 409fc3837..6bf3748c0 100644 --- a/code/demo.odin +++ b/code/demo.odin @@ -1,36 +1,31 @@ -#import "atomic.odin"; -#import "fmt.odin"; -#import "hash.odin"; -#import "math.odin"; -#import "mem.odin"; -#import "opengl.odin"; -#import "os.odin"; -#import "sync.odin"; -#import "utf8.odin"; - -type float32 f32; -const ( - X = iota; - Y; - Z; - A = iota+1; - B; - C; -); +import ( + "atomic.odin"; + "fmt.odin"; + "hash.odin"; + "math.odin"; + "mem.odin"; + "opengl.odin"; + "os.odin"; + "sync.odin"; + "utf8.odin"; +) type Byte_Size f64; const ( _ = iota; // ignore first value by assigning to blank identifier KB Byte_Size = 1 << (10 * iota); + // Because there is no type or expression, the previous one is used but + // with `iota` incremented by one MB; GB; TB; PB; EB; -); +) proc main() { - var x = 123; - fmt.println(x); + fmt.println("Here"); + } + -- cgit v1.2.3