aboutsummaryrefslogtreecommitdiff
path: root/code
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-02-26 00:44:26 +0000
committerGinger Bill <bill@gingerbill.org>2017-02-26 00:44:26 +0000
commitc59f6b7d0b582131bed4450bbb9aa1a71d5a01af (patch)
tree34957d43fa0241ffb6678302cae8e77fb7f8488b /code
parent67ed8a9a4ab8fdcfc77036c827b7dfa98025bc8b (diff)
++ -- statements; add strconv.odin (and replace some of the fmt procs); Fix ~ on 64 bit constants; Fix integer casts from smaller to larger size
Diffstat (limited to 'code')
-rw-r--r--code/demo.odin15
1 files changed, 10 insertions, 5 deletions
diff --git a/code/demo.odin b/code/demo.odin
index c548a9430..345ac7922 100644
--- a/code/demo.odin
+++ b/code/demo.odin
@@ -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 {
/*