ID:178864
 
I was wondering if there is anything like num2text() that sets how many zeros to display for a number? This would basically be used for something like a clock where you wouldn't want the width of it to change due to numbers being >= or < 10. I can compensate myself but I was just wondering if there was some built in feature for this sort of thing. This could also apply to decimal points like if you wanted to display a GPA and you want 4.0 to be displayed instead of just 4.
English wrote:
I was wondering if there is anything like num2text() that sets how many zeros to display for a number? This would basically be used for something like a clock where you wouldn't want the width of it to change due to numbers being >= or < 10. I can compensate myself but I was just wondering if there was some built in feature for this sort of thing. This could also apply to decimal points like if you wanted to display a GPA and you want 4.0 to be displayed instead of just 4.

Nope, there's no built-in proc for this, so you'll have to compensate yourself. In the case of a clock:
usr << "[hour]:[round(minute/10)][minute%10]"

And for GPA:
usr << "[round(GPA)].[round(GPA*10)%10]"

Lummox JR