ADA Flashcards
When and who developed ADA?
The 80s by Cii HoneyWell/Bull Language design team
What type of language is ADA?
a Structured, Statically-Typed, Imperative, Object-Oriented, High-Level language
From what language did it extend from?
Pascal
For who was the language?
the Department of Defense
Who is ADA named after?
Ada Lovelace, the first computer programmer
What are the major contributions of ADA?
- Packages allow encapsulating of data objects & specifications for data types and procedures
- Includes facilities for exception handling
- Program units can be generic
- Provides for concurrent execution of special program units, named tasks, using the rendezvous mechanism
Readability?
Good
Writability?
Sacrificed for Readability
Reliability?
Hallmark feature!!
Cost?
So-so
Program Structure
Importing of Libraries
Defining Procedures
Beginning Procedures
Main Code
Ending Procedure
Subprograms of ADA?
They are made of program units and are otherwise known as functions or procedures.
What about the syntax of ADA?
It is not case-sensitive. The statements end in semicolons. Variable declarations are in the declarative part and start with the identifier. It does not provide ++ or –. ‘:=’ is for value assignment.
The block delimiters for ADA are?
‘begin’ and ‘end’
What about arrays?
You declare types associated with the array.
What is the scope?
Static
What about classes in ADA?
They are aka as tagged type. It is in the same scope as the subprogram/functions/members.
What do objects in ADA have?
A Directory which is an object that is used to contain data from a database or some outside source.
the Operator Precedence.
** abs not
* / mod rem
+ -(unary)
+ - &(binary)
= /= < <= > >=
and or xor
If Statement Structure
if condition then
statement;
elsif condition then
statement;
else
condition;
end if;
What do cases start with and what can they do?
Cases start with ‘when’ and they can be combined.
While Loop Structure
while variable < 10_000 loop
…
end loop;
For Loop Structure
for variable in 0..9 loop
…
end loop;
What type of statements can you use in ADA?
You can use goto statements.
How do you call functions in ADA?
function Five (var : Integer) return Boolean;