I am not using C99 compiler. I am writing code for micro controller. I have very limited memory to accomplish task. snprintf is not working with my compiler. Is snprintf memory constraint?
Is there any way to get the job done utilizing minimum memory??
Mr. Gemni7 I do not know the answer to your questions. All that I know is that for compilers previous to the ISO C99 standards, snprintf() is not an obtion. In this case you will have to use the more portable function sprintf. Making sure you allow for enough space in the array to hold the float convertion.
Separate the number into 2 values at the decimal.
Convert the numbers into single integers using / and * and %
Convert each single digit to character (add 48)
Load the character values into your output array
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.