Page 1 of 1

how to printf float or double variable?

Posted: Tue Apr 21, 2015 11:51 am
by grantgao
i want to printf float and double variable ,i'v called the function "os_printf" like this "os_printf("nAdcVal=%d,fTemperature=%lf,fHumidity=%lf\r\n",nAdcVal,fTemperature,fHumidity)",but the output is "nAdcVal=0,fTemperature=%f ,fHumidity=%f ",why?