Toggle screen back and forth

Status
Not open for further replies.
Alright, that finally made the numbers display as two digits but the troubles aren't over. It doesn't seem to actually display the real number, instead it just displays a 0 infront of it. If the number goes above 10 it looks like "010".

I'm very surprised that there isn't a simple solution for this in mikroC. In MPLAB I could simply state the amount of decimal places I wanted. However, the reason I'm trying to stay in mikroC is that so far it's what my reading material has been based off so I'd hate to move to MPLAB and refamiliarize myself with it's version of C.

Very strange that there is no easy way of selecting the amount of decimal places in mikroC...
 

Very strange that there is no easy way of selecting the amount of decimal places in mikroC.
I'm not using mikroC, but I see that it provides a C-standard sprintf() function with format strings. In so far there should be an easy and portable way to print numbers in arbitrary formats according to your needs.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…