Skip to main content

Pragmas Restrictions

·
Table of Contents

Hello World Restricted #

Hello world restricted to the minimum of features needed. These kind of restrictions are only helpful for embedded development.

pragma License (Gpl);
pragma Ada_2022;

pragma Restrictions (
   Simple_Barriers,
   No_Abort_Statements,
   No_Asynchronous_Control,
   No_Calendar,
   No_Delay,
   No_Dynamic_Attachment,
   No_Dynamic_Priorities,
   No_Enumeration_Maps,
   No_Entry_Calls_In_Elaboration_Code,
   No_Entry_Queue,
   No_Exception_Registration,
   No_Initialize_Scalars,
   No_Local_Protected_Objects,
   No_Protected_Type_Allocators,
   No_Protected_Types,
   No_Relative_Delay,
   No_Requeue_Statements,
   No_Select_Statements,
   No_Streams,
   No_Task_Allocators,
   No_Task_Attributes_Package,
   No_Task_Hierarchy,
   No_Task_Termination,
   No_Tasking,
   No_Terminate_Alternatives,
   No_Wide_Characters,
   Static_Priorities,
   Static_Storage_Size,
   Immediate_Reclamation,
   No_Implementation_Restrictions,
   Max_Protected_Entries => 0,
   Max_Protected_Entries => 0,
   Max_Select_Alternatives => 0,
   Max_Task_Entries => 0,
   Max_Tasks => 0,
   Max_Asynchronous_Select_Nesting => 0);

with Ada.Text_IO;

procedure Hello_World_Restricted is
begin
   Ada.Text_IO.Put_Line ("Hello World!");
   Ada.Text_IO.New_Line;
   Ada.Text_IO.Put_Line ("This is a program with restricted runtime.");
end Hello_World_Restricted;