I am using the format function. I need to have a defined amount of characters. For instance it may read in the number 15 however the field is 7 characters long so it needs to write to a file with leading 0's. Also how do you read in decimal numbers (e.g. 3.6) and make it write to a file as 36.

Any suggestions?