Tool/software: Code Composer Studio
hi:
while i use Report function to show what the real value in the temp value,there
were some problem while i use the function.the function demo is just in below:
cJSON *cJSON_CreateNumber(double num) {
cJSON *item=cJSON_New_Item();
Report("--------kkkkkkk---------:%f------------\r\n\r\n",num)
long k=300;
Report("--------kkkkkkk---------:%f------------\r\n\r\n",k);
if(item) {
item->type=cJSON_Number;
//UART_PRINT("-----------------:%s------------\r\n\r\n",out);
item->valuedouble=num;
item->valueint=(int)num;
}
return item;
}
a.while i input "num" value as 2 ,2 is the int module.but while UART_PRINT in %d model ,the print result is 0;is there something wrong about the int and double.
b.while i define a temp value as int model and print as %d ,that was ok . but while i define a temp value as double ,and print it as %d ,it show wrong reslut.
c.i try to print temp value of double model output as %f,it show 0.000000..
d.while i print the function's input value ,not matter in double or in int ,there while be a warming under the print function.
(<a href="file:/D:/CCS/ccsv6/tools/compiler/dmed/HTML/225.html">#225-D</a> function "Report"
declared implicitly)
is there something wrong with CC3200 Coter-M4?some suggesttions will be helpful.