Just putting part of some code here where I am writing two values to a text file.
Ada.Long_Float_Text_IO.Put (File => Output_File, Item => Out_2, Fore => 1, Aft => 4, Exp => 0);
Ada.Text_IO.Put (Output_File, " ");
Ada.Long_Float_Text_IO.Put (File => Output_File, Item => Out_3, Fore => 1, Aft => 4, Exp => 0);
I can separate these numbers Out_2 and Out_3 by a space as shown in the code. The results give (after writing more numbers in the two columns):
-75.2340 421.5700
1256.0000 15.4700
-4568.9800 -118.2800
3784.2100 0.0000
I would like to know if there is a way to specify a tab spacing so that I can have something like this in my text file:
-75.2340 421.5700
1256.0000 15.4700
-4568.9800 -118.2800
3784.2100 0.0000
So which control character produces the above alignment?
Thanks a lot…
For a tab, there’s the obsolescent
ASCII.HTorAda.Characters.Latin_1.HT.Or you could use the
Widthparameter toAda.Long_Float_Text_IO.Putand friends.Edit: There is no
Widthparameter for real output! You could use a largeFore, which would effectively right-justify the output.