Discussion to talk about software related topics only.
-
Arturino
- Posts: 11
- Joined: Tue Jan 15, 2013 6:05 am
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
Is output of numbers with floating point implemented in the library?
How I suppose to output them?
-
tony
- Posts: 49
- Joined: Thu Apr 24, 2008 6:05 pm
Post
by tony »
You need to use printf. iprintf only handles integers.
-
Arturino
- Posts: 11
- Joined: Tue Jan 15, 2013 6:05 am
Post
by Arturino »
Thanks, it worked.
-
rnixon
- Posts: 833
- Joined: Thu Apr 24, 2008 3:59 pm
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
Post
by Ridgeglider »
same goes for the sprintf(() / siprintf functions and the preferred snprintf() / sniprintf variants