I need to convert a float to a string, after rounding it to 1 decimal place.
For example: float f = 1.264 the string should be "1.3".
I have just discovered that I do have access to sprintf, although in my compiler it doesn't actually "print" anything (its on a PIC microcontroller ). The only problem is that I have no idea how to drive it!
I've attached the relevant page from the help file: perhaps someone who knows this function could help.
TIA
For example: float f = 1.264 the string should be "1.3".
I have just discovered that I do have access to sprintf, although in my compiler it doesn't actually "print" anything (its on a PIC microcontroller ). The only problem is that I have no idea how to drive it!
I've attached the relevant page from the help file: perhaps someone who knows this function could help.
TIA
Comment