aboutsummaryrefslogtreecommitdiff
path: root/code
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2016-12-20 18:58:17 +0000
committerGinger Bill <bill@gingerbill.org>2016-12-20 18:58:17 +0000
commitd0e1efe622f921fd763f5d88cc5011e940f0c9cd (patch)
treeed171793f3f988e3b64e59958bac0470c88388a4 /code
parent478d63424fb99c368a0cfae88704b2c903956a1d (diff)
Generic (grouped) declarations: var, let, const, type, import, include
Diffstat (limited to 'code')
-rw-r--r--code/demo.odin39
1 files changed, 17 insertions, 22 deletions
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");
+
}
+