Ada Code Examples | |
| CSc 233 Ada Home Page | |
Basic examples, Control Structures, Basic Types.
Hello, World!
Using GNAT I/O
Numeric constants and expressions
Simple Subrange Types and Subtypes
Enumerated Types
I/O With Enumerated Types
Calculator Program
Arrays.
Basic Arrays
Primes by Seive
Array Aggregates
Two-Dimensional Array
Array of Arrays
Array Slicing
Skip and Read
Simple Record Use
Functions and Procedures.
Simple Function 1
Simple Function 2
Operator Overloading
Skip and Read 2
In and Out Parameters.
Default and Keyword Parameters.
Function Overloading.
Access Types (Pointers).
Simple Linked List.
Simple Linked List With Disposal.
Skip and Read 3
Rules for all pointers
Function Access
Packages
Simple Stack Package.
![]()
Integer Stack Package Specification![]()
Integer Stack Package Body![]()
Integer Stack Demonstration Client
Rational Numbers.
![]()
Rational Number Package Spec![]()
Rational Number Package Body![]()
Rational Number Example Client
Linked Stack Package.
![]()
Linked Stack Package Specification![]()
Linked Stack Package Body![]()
Linked Stack Client
Reversable Stack (Derived).
![]()
Reversable Stack Child Package![]()
Reversable Stack Child Body![]()
Reversable Stack Client
Wanderer.
![]()
Wanderer Package![]()
Wanderer Package Body![]()
Wanderer Package Separate Function![]()
Wanderer Client
Renaming.
Function Rename 1
Function Rename 2
Sequence Generator Inheritance Heirarchy.
![]()
Sequnce Abstract Class![]()
Sequnce Class Body![]()
Computational Sequence Class![]()
Computational Sequence Class Body![]()
Additive Sequence Class![]()
Additive Sequence Class Body![]()
Multiplicative Sequence Class![]()
Multiplicative Sequence Class Body![]()
Listing Sequence Class![]()
Listing Sequence Class Body![]()
Polymorphic Driver
Object-Oriented Generalized Stack.
![]()
OO Generalized Stack Package![]()
OO Generalized Stack Body![]()
OO Integer Stack Package![]()
OO Integer Stack Body![]()
OO String Stack Package![]()
OO String Stack Body![]()
OO Stack Driver
Exceptions.
EOF Exception Example
Data Exception Example
Data Exception with Continuation Example
Integer Stack with Exceptions
Integer Stack with Exceptions Body
Integer Stack with Exceptions Client
Parameterized Types and Generics.
Linked List of Strings
General Stack Package
General Stack Body
General Stack Client
Variant Record