Articles


Checking file header with Adacontrol

Many times you want to make sure that your code has correct comment block at the beginning of the source code file. This comment block can contain the source code license, copyright information, the name of the author, or description of the file. Adacontrol can help you here with its …

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 …