sprintf with CW6.2 and MCF51JM

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

sprintf with CW6.2 and MCF51JM

737 Views
yb
Contributor IV

Hi,

 

I'm trying to modify a 9S08JM code for a MCF51JM target.

 

But the sprintf function doesn't work the same on theses 2 targets...

 

With the 9S08 :

 

var = 12 ;

sprintf(temp, "%04d", var) ;

==> temp = "0012" ==> OK

 

With the MCF :

==> temp = "12" ==> NOK...

 

Perhaps some directives ? Or a special CW configuration ?

 

Thanks for your answers.

 

Yvan

Labels (1)
0 Kudos
1 Reply

175 Views
yb
Contributor IV

Sorry, I've found the answer :

 

https://community.freescale.com/message/52981#52981

 

Yvan

0 Kudos