#text_io Articles


Redirecting Text_IO output to a file

One, probably not so often used, feature of Ada.Text_IO is an ability to redirect output (Put, Put_Line, Newline) to a file. It happens simply by opening a file where you want to redirect the output and then calling Set_Output procedure. Example below shows how it is done: with Ada …