Text IO

For text Input and Output.

with Ada.Text_IO;

Put

Writes text in format String to output.

Standard Default Output is the console.

Put(S: String);
Put(S: String; F: File);

New_Line

Writes into a New Line.

Can also write into a File. Or write N new Lines.

New_Line;
New_Line (
  Number_Of_New_Lines: Positive:= 1);

Put_Line

Writes text in format String to output. Also writes a New_Line.

Basically a Put(...); New_Line;

Put_Line(S: String);
Put_Line(S: String; F: File);

Get_Line

Reads from standard file to next end of line.

Get_Line(S : out String);
Get_Line(S : out String, N_of_Chars: integer);

Example of use:

Name : String(1..100);
Last: Integer 
Get_Line(Name, Last); 
Put_Line("Hello " & Name(1..Last)); 
    --Name slice

Set_Col

Sets a horizontal position for the next output.

If there has been an output in the current line, New_Line gets called.

set_Col(Position : Positive); --Start counting at 1