MOD54415 iprintf() for float type problem

Discussion to talk about software related topics only.
Post Reply
Arturino
Posts: 11
Joined: Tue Jan 15, 2013 6:05 am

MOD54415 iprintf() for float type problem

Post by Arturino »

I'm having problems with float numbers output on NB54415.

Command:

Code: Select all

iprintf("Val %4.2f \r\n", 3.132543);
returns

Code: Select all

Val    f
Is output of numbers with floating point implemented in the library?
How I suppose to output them?
User avatar
tony
Posts: 49
Joined: Thu Apr 24, 2008 6:05 pm

Re: MOD54415 iprintf() for float type problem

Post by tony »

You need to use printf. iprintf only handles integers.
Arturino
Posts: 11
Joined: Tue Jan 15, 2013 6:05 am

Re: MOD54415 iprintf() for float type problem

Post by Arturino »

Thanks, it worked.
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Re: MOD54415 iprintf() for float type problem

Post by rnixon »

The 'i' in iprintf() = integer. Adding floating point takes up a lot of space for those application that are space limited.
Ridgeglider
Posts: 513
Joined: Sat Apr 26, 2008 7:14 am

Re: MOD54415 iprintf() for float type problem

Post by Ridgeglider »

same goes for the sprintf(() / siprintf functions and the preferred snprintf() / sniprintf variants
Post Reply