Hi everyone
I have a question regarding string format. If I want to write a set of
numeric values from arrays to a text file with the "right alignment" format
as below, can it be done? Basically, I want to format a number from an array
to a fix length. I want to line up digits of numbers in a column with
respect to their position. For instant, in Col1 which contains all integers
they should align to the right and in Col2 all number should also their
decimal point aligned and also to the right. Do you guys think this can be
done? In C I would use the fprintf function for example fprintf( o3, "%4d
%16.6e\n", i, j)); to write to a text file. Could you please guys give me a
hand?
Regards,
Sam
Col 1 Col2
8 7.000000
100 42.000000
9 8.000000
10 9.000000
11 10.000000
12 11.000000