mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-19 21:10:30 +00:00
Generic (grouped) declarations: var, let, const, type, import, include
This commit is contained in:
@@ -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");
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user