http://qs1969.pair.com?node_id=11134573


in reply to Re^2: [OT(C)] float parameter treated as double by callee -- but it fails with FFI
in thread [OT(C)] float parameter treated as double by callee -- but it fails with FFI

That's why there's no printf length modifier for char, float or double.

signed char c = 123; int i = 123; float f = 123; double d = 123; printf("%d\n", i); // ok printf("%d\n", c); // ok, even though %d expects int. printf("%f\n", d); // ok printf("%f\n", f); // ok, even though %f expects double.

(Not sure why there's one for short since they are guaranteed to be no larger than an int and unsigned int respectively.)

Seeking work! You can reach me at ikegami@adaelis.com