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 ...

Checking "out" parameters with Adacontrol

Have you ever accidentally written code like this? procedure Example_Proc (X : out Boolean) is begin null; -- Do something, but do not touch X end Example_Proc; with Example_Proc; procedure Main is My_Flag : Boolean; begin Example_Proc (My_Flag); end Main; In the above code, parameter X with mode "out" is left untouched. Because ...