Ada

Print

Ada.Text_IO.Put_Line ("Hello, World!");

Variables

X := 4;
X: Integer := 4;
X: constant Integer := 4;

Data types

-- basic types
X: Integer;
X: Float;
X: String;
type Boolean is (False, True);

-- enum
type Color is (Red, Green, Blue);

Operators

-- Logical operators
= -- equal
/= -- not equal
and -- AND
or -- OR
xor -- XOR

Control flow

-- if-else
if a > b then
    statement;
elsif a == b then
    statement;
else
    statement;
end if;

Functions

-- procedure
procedure Add (A, B: in Integer; C: out Integer) is
begin
   C := A + B;
end Add;

-- function
function Add (X, Y: Integer) return Integer is
begin
    return X + Y;
end Add;