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,474件の閲覧回数
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,242件の閲覧回数
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,242件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

Hello koichi sakagami,

Which processor do you use?

Did you create a bareboard project?

Thanks,

Yiping

0 件の賞賛
返信
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 件の賞賛
返信