Yvan BOURNE

sprintf with CW6.2 and MCF51JM

Discussion created by Yvan BOURNE on Mar 8, 2010
Latest reply on Mar 8, 2010 by Yvan BOURNE

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

Outcomes