how to printf float or double variable?

grantgao
Posts: 36
Joined: Tue Apr 14, 2015 5:20 pm

how to printf float or double variable?

Postby grantgao » Tue Apr 21, 2015 11:51 am

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?

Who is online

Users browsing this forum: Bing [Bot] and 5 guests