Task

Express a number in decimal as a fixed-length string with leading zeros.



For example, the number   7.125   could be expressed as   00007.125.




 
decimals(3)
see fixedprint(7.125, 5) + nl
 
func fixedprint num, digs
     for i = 1 to digs - len(string(floor(num)))
         see "0"
     next
     see num + nl 
 