1. Home
  2. /
  3. Ada
  4. /
  5. Theme Toggle Only

Theme Toggle Only - Ada Typing CST Test

Loading…

Theme Toggle Only — Ada Code

Toggles theme multiple times.

with Ada.Text_IO; use Ada.Text_IO;
procedure Theme_Toggle_Only is
	Is_Dark : Boolean := False;
begin
	Put_Line("Theme: " & (if Is_Dark then "Dark" else "Light"));
	Is_Dark := not Is_Dark;
	Put_Line("Theme: " & (if Is_Dark then "Dark" else "Light"));
	Is_Dark := not Is_Dark;
	Put_Line("Theme: " & (if Is_Dark then "Dark" else "Light"));
end Theme_Toggle_Only;

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.

More Ada Typing Exercises

Ada Counter and Theme ToggleAda Simple AdditionAda FactorialAda Fibonacci SequenceAda Max of Two NumbersAda List SumAda Even Numbers FilterAda Conditional Counter IncrementAda Resettable Counter

Practice Other Languages

CReactPythonC++RustTypeScriptKotlinPHPJavaC#RubyMqlCqlN1qlCypher