aboutsummaryrefslogtreecommitdiff
path: root/code
diff options
context:
space:
mode:
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 {
/*