List Sum - Ada Typing CST Test
Loading…
List Sum — Ada Code
Sums elements of an array.
with Ada.Text_IO; use Ada.Text_IO;
procedure List_Sum is
Arr : array(1..5) of Integer := (1,2,3,4,5);
Sum : Integer := 0;
begin
for I in Arr'Range loop
Sum := Sum + Arr(I);
end loop;
Put_Line("Sum: " & Integer'Image(Sum));
end List_Sum;Ada Language Guide
Ada is a statically typed, high-level programming language designed for safety-critical, real-time, and concurrent systems. Developed with reliability and maintainability in mind, Ada emphasizes strong typing, modularity, exception handling, and support for concurrent programming.
Primary Use Cases
- ▸Safety-critical avionics systems
- ▸Real-time embedded software
- ▸Railway signaling and control
- ▸Defense and military software
- ▸Medical device software
- ▸High-integrity systems requiring formal verification
Notable Features
- ▸Strong static typing and compile-time checks
- ▸Support for tasking (concurrency)
- ▸Exception handling and robust error management
- ▸Package-based modularity
- ▸Design-by-contract with pre/post conditions
Origin & Creator
Ada was commissioned by the U.S. Department of Defense in the late 1970s and early 1980s, designed by Jean Ichbiah and his team at CII Honeywell Bull under the name 'Ada' in honor of Ada Lovelace.
Industrial Note
Ada is essential in avionics, railway control systems, nuclear power plant software, medical devices, and mission-critical defense applications where software failure is unacceptable.