sprintf with CW6.2 and MCF51JM

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

sprintf with CW6.2 and MCF51JM

1,069 次查看
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

标签 (1)
标记 (1)
0 项奖励
回复
1 回复

507 次查看
yb
Contributor IV

Sorry, I've found the answer :

 

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

 

Yvan

0 项奖励
回复