Skip to main content

Basic Ada

·

Hello World 1 #

Hello world standard version.

pragma License (Gpl);
pragma Ada_2022;

with Ada.Text_IO;

procedure Hello_World_1 is
begin
   Ada.Text_IO.Put_Line ("Hello World!");
end Hello_World_1;

Hello World 2 #

Hello world with package rename.

pragma License (Gpl);
pragma Ada_2022;

with Ada.Text_IO;

procedure Hello_World_2 is
   package IO renames Ada.Text_IO;
begin
   IO.Put_Line ("Hello World!");
   IO.New_Line;
   IO.Put_Line ("I am an Ada programm with package rename.");
end Hello_World_2;

Hello World 3 #

Hello world with package use.

pragma License (Gpl);
pragma Ada_2022;

with Ada.Text_IO;

procedure Hello_World_3 is
   use Ada.Text_IO;
begin
   Put_Line ("Hello World!");
   New_Line;
   Put_Line ("I am an Ada programm with package use.");
end Hello_World_3;