Posts

Showing posts from October, 2020

Tasking and Ada Rendezvous

  Tasking and the Ada Rendezvous Multiprocessing has been a part of the Ada programming language since the language was first standardized in 1983. The original version of Ada provided active concurrency objects called tasks. Today tasks are commonly implement by Ada compilers as operating system threads, but the Ada language does not depend on operating system threading to implement tasks. The execution of an Ada program consists of the execution of one or more  tasks .  Each task represents a separate thread of control that proceeds independently and concurrently between the points where it  interacts  with other tasks. The various forms of task interaction are described in this clause, and include: ·          the activation and termination of a task; ·          a call on a protected subprogram of a  protected object , providing exclusive read-write access, or concurre...

Is Ada truly verbose?

  People who prefer programming language syntax derived from the C language have often argued that the Ada language is verbose because it uses entire words rather than punctuation. Meaning C Syntax Ada Syntax Begin a block { begin, loop End a block } end, end if, end loop, end subprogram name, end task name, end protected object name, end record Declare a function taking a single integer parameter and returning an integer value int foo (int x); function foo (x : integer) return integer; Declare a 10 element integer array indexed with the values 0 through 9 int a [10]; a : array (0..9) of integer; Write a “for” loop to sum all the elements in array a declared above. for (int I = 0; I < 10; i++) {    sum += a [i]; } for I in a’range loop    sum := sum + a (i); ...