Say I have a string, with a decimal, such as:
char String = "123.45";
But I want to convert in to an unsigned long, with fixed point maths. I assume there's a simple routine such as atol that will convert numerical string to unsigned longs, but I also need the decimals.
I have very limited codespace left, and so I cannot fit in the floating point libraries, hence the need for my own simple fixed point maths; shifting the variable left and right twice.
How do I convert the string simply and preserve the decimals, without using the flotaing point maths libraries, only fixed point maths?
- Dean :twisted: