c2c_native
c2c_native copied to clipboard
Floating point parsing error
The following code produces a syntax error
module hello;
import stdlib local;
import stdio as io;
func f32 add(f32 a, f32 b) {
return a + b;
}
public func i32 main() {
f32 c = add(1.1, 2);
io.printf("The value of the first entry is %d\n", c);
return 0;
}
main.c2:12:16: error: expected identifier
f32 c = add(1.1, 2);
^
Changing 1.1 to 1.0 works