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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

Jump to solution
765 Views
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

Labels (1)
0 Kudos
1 Solution
533 Views
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

View solution in original post

0 Kudos
2 Replies
533 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello koichi sakagami,

Which processor do you use?

Did you create a bareboard project?

Thanks,

Yiping

0 Kudos
534 Views
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 Kudos