mirror of
https://github.com/odin-lang/Odin.git
synced 2026-06-08 03:24:19 +00:00
++ -- statements; add strconv.odin (and replace some of the fmt procs); Fix ~ on 64 bit constants; Fix integer casts from smaller to larger size
This commit is contained in:
@@ -5,14 +5,19 @@
|
||||
#import "mem.odin";
|
||||
#import "opengl.odin";
|
||||
#import "os.odin";
|
||||
|
||||
foo :: proc(x: int) -> f32 {
|
||||
return 123;
|
||||
}
|
||||
#import "strconv.odin";
|
||||
|
||||
main :: proc() {
|
||||
buf: [64]byte;
|
||||
// len := strconv.generic_ftoa(buf[:], 123.5431, 'f', 4, 64);
|
||||
x := 624.123;
|
||||
s := strconv.format_float(buf[:], x, 'f', 6, 64);
|
||||
fmt.println(s);
|
||||
fmt.printf("%.3f\n", x);
|
||||
|
||||
i := 123;
|
||||
fmt.println(123);
|
||||
|
||||
fmt.printf("%T\n", foo);
|
||||
|
||||
when false {
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user