Open Its-Kenta opened 1 year ago
floats should work like they do in C, but some stuff is broken right now :(
Well, that a bummer. I will have to postpone my binding work until this gets fixed in that case.
you can try the same with libc::printf
, in case it's just a bug in fmt.csp
, you'll have to import "libc/stdio.csp"
tho
you can try the same with
libc::printf
, in case it's just a bug infmt.csp
, you'll have toimport "libc/stdio.csp"
tho
Unfortunately same issue. If anything libc ver spews only 0's.
does it still occur when transpiling to C? (with the -t
compiler option)
does it still occur when transpiling to C? (with the
-t
compiler option)
No, it seems like transpiling to C works.
Then it's a bug in the assembly generator I'll have to fix.
I've encountered an odd behaviour with floats and printf where the output returned is not the value you've provided: We have the following code:
The output is:
Does CSpydr not use the same formatting rule as C? Is there something done wrong in this example or there is a deeper underlying problem causing this? As you can see, the integer is printed out fine.