Does the CodeWarrior(CW for PA 10.0.2) support the float/double format with printf()/sprintf() ?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Does the CodeWarrior(CW for PA 10.0.2) support the float/double format with printf()/sprintf() ?

跳至解决方案
1,475 次查看
koichisakagami
Contributor II

Dear community,

I expected that the printf() displays an output according to general ANSI-C specification.
However, the result was different.

 

For example, I programmed as follows.

        float val = 7.4;
        printf("%f\n", val);

Then,  It displayed " %f " insted of displaying " 7.4"

 

[Question]

Does the CodeWarrior(CW for PA 10.0.2) support the float/double format with printf()/sprintf() ?

 

Best Regards,

Koichi Sakagami

标签 (1)
0 项奖励
回复
1 解答
1,243 次查看
yipingwang
NXP TechSupport
NXP TechSupport

Hello koichi sakagami ,

Please update to CodeWarrior 10.5.1 if necessary, I have checked it,  there is no this problem.

Thanks,

Yiping

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,243 次查看
yipingwang
NXP TechSupport
NXP TechSupport

Hello koichi sakagami,

Which processor do you use?

Did you create a bareboard project?

Thanks,

Yiping

0 项奖励
回复
1,244 次查看
yipingwang
NXP TechSupport
NXP TechSupport

Hello koichi sakagami ,

Please update to CodeWarrior 10.5.1 if necessary, I have checked it,  there is no this problem.

Thanks,

Yiping

0 项奖励
回复