An Ada main program is a parameterless procedure: procedure Hello is begin ... end Hello;.
Ada · Lesson 1 · On the house
Program structure and output
with clauses, procedure bodies, Put_Line, and building with gnatmake. Lesson 1 is free — on the house.
Lessons · Ada · Lesson 1 of 10 · On the house
Program structure and output
with clauses, procedure bodies, Put_Line, and building with gnatmake.

with Ada.Text_IO; makes a library package available; use Ada.Text_IO; lets you drop the prefix.
Put prints without a newline, Put_Line with one, New_Line prints a bare newline.
Build and run with GNAT: gnatmake hello.adb && ./hello. The file name should match the unit name in lowercase.
Ada is case-insensitive; comments start with --. Statements end with ;.
hello
with Ada.Text_IO; use Ada.Text_IO;
procedure Hello is
begin
Put_Line ("Hello from Ada");
Put ("same ");
Put ("line");
New_Line;
Ada.Text_IO.Put_Line ("fully qualified call");
end Hello;
Quiz
Quiz
Quiz
Quiz
Check
Match the still for: Program structure and output.
Open-book: the answers are on this page. Pass every quiz and check (5) to mark the lesson done. This visit: 0/5.