Conditional Counter Increment - Ada Typing CST Test
Loading…
Conditional Counter Increment — Ada Code
Increment counter only if less than 5.
with Ada.Text_IO; use Ada.Text_IO;
procedure Conditional_Increment is
Count : Integer := 3;
begin
if Count < 5 then
Count := Count + 1;
end if;
Put_Line("Count: " & Integer'Image(Count));
end Conditional_Increment;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.