in reply to Pointers to formatting output

I'm not sure what you are trying to achieve, but have a look at printf or here at the monastery Using (s)printf().

-- Hofmator