Ada Programs
- ./Josephus/josephus.adb --
remove every ith member of a circular list
- ./access/cd.adb --
using pointers to arrays and strings to represent audio CD info
- ./access/name.adb --
pointers to strings of length 20
- ./access/simple.adb --
some simple examples of pointers
- ./access/tree.adb --
preorder traversal of binary tree
- ./access/unbounded.adb --
illustrating access to String
- ./approx/approx.adb --
approximate string matching
- ./approx/main.adb --
main program for approximate string matching
- ./args/args.adb --
simple program illustraing use of command line package
- ./args/convert.adb --
convert command line string to float
- ./args/os.adb --
illustrate GNAT's hooks to underlying operating system
- ./array/a2.adb --
comparing 2D arrays and array of arrays
- ./array/array_test.adb --
procedure Array_Test is
- ./array/bounds.adb --
upper and lower bounds of strings
- ./array/cnst.adb --
small program showing constant arrays can't be changed
- ./array/compare.adb --
comparing arrays and array slices
- ./array/component.adb --
componentwise operations on boolean arrays
- ./array/concatenation.adb --
concatentation of arrays
- ./array/dim2.adb --
examples of two dimensional arrays
- ./array/dim3.adb --
average all the elements of a 3 dimensional array
- ./array/drill-find_next.adb --
separate (Drill)
- ./array/drill.adb --
with Ada.Text_IO, Ada.Float_Text_IO, Ada.Integer_Text_IO;
- ./array/frequency.adb --
count, display character frequency in standard input
- ./array/fun.adb --
arrays and functions
- ./array/index.adb --
two-dimensional arrays indexed by discrete types
- ./array/mult.adb --
program with matrix multiplication subprocedure
- ./array/passing.adb --
parameter-passing mechanism effects program
- ./array/reverse_list.adb --
get integers and reverse them (with attributes)
- ./array/reverse_list_1.adb --
get integers and reverse them
- ./array/reverse_list_2.adb --
get integers and reverse them a "one-time" array
- ./array/simple.adb --
simple example of array declarations and access
- ./array/stats.adb --
compute average, standard deviation of array of values
- ./array/store.adb --
sales of a store in a 4 dimensional array
- ./array/sub.adb --
array attributes, operations, and slices
- ./array/tax.adb --
compute income tax using arrays of rates and tax bracktes
- ./array/test.adb --
program to test array type compatibility
- ./assert/binomial.adb --
compute the binomial coefficient
- ./assert/condition.adb --
pre- and post-conditions
- ./assert/main.adb --
pragma "Assert" in GNAT and exception information
- ./block/block.adb --
find min and max using the block statement
- ./block/golden.adb --
-- golden.adb
- ./bounded/bounded_strings.adb --
generic package implementing bounded-length strings
- ./bounded/bounded_strings.ads --
generic package implementing bounded-length strings
- ./bounded/sort_names.adb --
A main program using generic bounded strings package
- ./business/generic_selection_sort.adb --
sort array "List" in non-decreasing order using selection sort
- ./business/generic_selection_sort.ads --
sort array "List" in non-decreasing order using selection sort
- ./business/sort-get_data.adb --
get employee records from data file
- ./business/sort.adb --
sort employee records in a file by name, id, salary, or dept
- ./c/dir.adb --
with Interfaces.C, Interfaces.C.Pointers; use Interfaces;
- ./c/main.adb --
with Interfaces.C; use Interfaces;
- ./c/test.adb --
with Interfaces.C; use Interfaces;
- ./cards/card_main.adb --
with Ada, Ada.Text_IO, Card_Package, Deck_Package;
- ./cards/card_package.adb --
with Ada, Ada.Text_IO, Ada.Integer_Text_IO;
- ./cards/card_package.ads --
package Card_Package is
- ./cards/deck_package.adb --
with Ada, Ada.Numerics.Discrete_Random, Card_Package;
- ./cards/deck_package.ads --
with Card_Package;
- ./case/days.adb --
example use of the case statement
- ./case/grade.adb --
example use of the case statement
- ./case/parse.adb --
categorized characters of a file
- ./case/telephone.adb --
example use of the case statement
- ./char/char.adb --
get a character, write the character and its position
- ./complex/complex.adb --
package for complex numbers
- ./complex/complex.ads --
package for complex numbers
- ./complex/complex_main.adb --
program to read and write complex numbers
- ./complex/main.adb --
read and write complex numbers in the form (x±yi)
- ./craps/craps.adb --
Play one game of craps, gambling game using two dice
- ./date/Friday.adb --
package "Ada.Calendar" used to see if today is friday
- ./date/calendar_date.adb --
package with function for day of week
- ./date/calendar_date.ads --
package with function for day of week
- ./date/date.adb --
use "Calendar_Date" package to compute day of week for 11/20/1997
- ./date/dow.adb --
print today's date using "Ada.Calendar" package
- ./date/friday.adb --
package "Ada.Calendar" used to see if today is friday
- ./date/today.adb --
print today's date using "Ada.Calendar" package
- ./decimal/error.adb --
round-off error may be avoided using "decimal" type
- ./derived/cnst.adb --
constants are not inherited by derived types
- ./derived/derived.adb --
type of derived subprograms
- ./dutch/tricolor_thing.adb --
with Ada, Ada.Numerics.Discrete_Random;
- ./dutch/tricolor_thing.ads --
package Tricolor_Thing is
- ./easter/easter.adb --
calculation of Easter in the Gregorian calendar
- ./easter/golden.adb --
compute Golden number for 1997 and several integer constants
- ./easy/assign.adb --
a few assignment statements
- ./easy/cond.adb --
some different "if" statements
- ./easy/grade.adb --
get student records from standard input and print some
- ./easy/hello.adb --
simple main program with string constants
- ./easy/io.adb --
get an integer and a float
- ./easy/main.adb --
procedure Main is
- ./easy/number.adb --
copy standard input to output and number the lines
- ./easy/proportions.adb --
DWM case study "Mixing Proportions", page 135-138
- ./easy/world.adb --
with Ada.Text_IO;
- ./enum/day.adb --
a procedure illustrating enumeration types and IO
- ./enum/over.adb --
a procedure illustrating overloaded enumeration types
- ./enum/ski_wax.adb --
determine best ski wax given snow conditions
- ./euler/euler_phi.adb --
compute Euler's phi function, number of relatively prime
- ./euler/main.adb --
use a separately compiled function to compute Euler's phi function
- ./except/arg_or_default.adb --
with Ada.Command_Line; -- access to external execution env (Ada95 A.15)
- ./except/block.adb --
an Ada block using exception handling for input errors
- ./except/final.adb --
copy a file, character by character, to standard output
- ./except/fragment1.adb --
an Ada block declaring, raising, and handling exceptions
- ./except/fragment2.adb --
an Ada block declaring, raising, and handling exceptions
- ./except/madness.adb --
-- From Barnes, page 141
- ./except/main.adb --
compute the binomial coefficient
- ./except/occur.adb --
an example of exception occurrences and exception info
- ./except/over.adb --
catch overflow in multiplication function
- ./except/product.adb --
use exception handling to deal with overflow
- ./except/propagation.adb --
illustrate exception propagation
- ./except/question_10.adb --
a puzzle about exception handling
- ./except/question_10a.adb --
understand program without exception handling first
- ./except/read.adb --
use exception handling in an input validation loop
- ./except/recurse.adb --
Local exceptions are not local in recursive programs
- ./except/simple_read.adb --
enumeration IO and predefined exception handling
- ./except/stack.adb --
underflow, overflow in stacks make good exceptions
- ./fact/nonzero.adb --
find last nonzero digit of N factorial
- ./fact/nonzero2.adb --
find last nonzero digit of N factorial
- ./factor/factor.adb --
function and types for array of factors
- ./factor/factor.ads --
function and types for array of factors
- ./factor/main.adb --
compute some some numbers based on factorization of input
- ./for/countdown.adb --
count backwards from 10
- ./for/for_example.adb --
a procedure illustrating "for" loops
- ./for/formula.adb --
print a table of the sum 1..N of powers
- ./for/hobo.adb --
"Lazy Hobo Riddle" from Cohoon & Davidson
- ./for/main.adb --
a procedure illustrating for loops and ranges of arrays
- ./for/nested.adb --
print multiplication table using nested "for" loops
- ./for/pyramid.adb --
prints a pattern of letters in shape of pyramid
- ./for/pythagorean.adb --
search for pythagorean triples up to N
- ./for/simple_for.adb --
program illustrating simple "for" loops
- ./for/temperature.adb --
high and low temperatures over 24 hours
- ./for/triangle.adb --
with Ada.Text_IO, Ada.Integer_Text_IO;
- ./for/triples.adb --
-- triples.adb -- generate and print pythagorean triples
- ./fraction/fraction_package.adb --
fraction (rational numbers) package
- ./fraction/fraction_package.ads --
fraction (rational numbers) package
- ./fraction/gcd.adb --
GCD function
- ./fraction/main.adb --
program using package "Fraction_Package"
- ./fraction/opaque.adb --
fraction package with data representation hidden
- ./fraction/opaque.ads --
fraction package with data representation hidden
- ./fraction/stack_machine.adb --
with Ada.Integer_Text_IO, Ada.Text_IO, Ada.Strings.Fixed,
- ./fsm/traffic.adb --
with Ada.Text_IO, Ada.Integer_Text_IO; use Ada;
- ./fsm/vending.adb --
example finite state machine for vending machine
- ./funarg/abuse.adb --
try to slip closure out of its proper context
- ./funarg/diff.adb --
environment pointer is necessary in closure
- ./funarg/down.adb --
Passing subprograms down
- ./funarg/main.adb --
procedure Main is
- ./funarg/pass.adb --
passing procedures as parameters
- ./funarg/ret.adb --
Passing subprograms up
- ./funarg/up.adb --
Passing subprograms up
- ./gender/gender.adb --
simple dialog using "Put" for characters
- ./generic/gen_bin_search.adb --
generic procedure to do binary search
- ./generic/gen_bin_search.ads --
generic procedure to do binary search
- ./generic/main_search.adb --
find all words of command line in input stream
- ./generic/matrix_main.adb --
- ./generic/matrix_package_1.adb --
- ./generic/matrix_package_1.ads --
- ./generic/matrix_package_2.adb --
- ./generic/matrix_package_2.ads --
- ./generic/matrix_package_3.adb --
- ./generic/matrix_package_3.ads --
- ./generic/matrix_package_4.adb --
- ./generic/matrix_package_4.ads --
- ./generic/swap.adb --
generic procedure to exchange two variables
- ./generic/swap.ads --
generic procedure to exchange two variables
- ./generic/tree_main.adb --
with Tree_Package;
- ./generic/tree_package.adb --
with Ada.Text_IO, Ada.Integer_Text_IO;
- ./generic/tree_package.ads --
package Tree_Package is
- ./goto/alt.adb --
a version of "main.adb" without gotos
- ./goto/fun.adb --
a version of "main.adb" using a function
- ./goto/main.adb --
possibly reasonable use of "goto" statement
- ./graph/graph-search.adb --
package body Graph.Search is
- ./graph/graph-search.ads --
generic
- ./graph/graph.adb --
Generic package for weighted digraphs
- ./graph/graph.ads --
Generic package for weighted digraphs
- ./graph/main_path-bfs.adb --
with Linked_Queue;
- ./graph/main_path-dfs.adb --
with Unbounded_Stack;
- ./graph/main_path-sfs.adb --
with Priority_Queue;
- ./graph/main_path.adb --
with Graph;
- ./graph_cheap/graph.adb --
package body Graph is
- ./graph_cheap/graph.ads --
generic
- ./graph_cheap/main.adb --
with Graph;
- ./group/main.adb --
example generic function invocation
- ./group/power.adb --
generic function for group exponentiation
- ./group/power.ads --
given a group, provide power function
- ./hide/hide.adb --
Ada program using a package for information hiding
- ./hide/pack.adb --
Ada package with a function
- ./hide/pack.ads --
Ada package with a function
- ./inh/inh.adb --
- ./inh/subclass.adb --
- ./integer/int.adb --
integer type, subtypes, and derived types
- ./integer/size.adb --
universal integer expressions and large integers
- ./integer/sub.adb --
subtypes
- ./integer/unn.adb --
integer type, subtypes, dervied types, universal named numbers
- ./integration/riemann.adb --
with Ada.Text_IO, Ada.Float_Text_IO;
- ./integration/simpson.adb --
with Ada.Text_IO, Ada.Float_Text_IO;
- ./integration/trapezoid.adb --
with Ada.Text_IO, Ada.Float_Text_IO;
- ./inter/inter.adb --
with Ada.Text_IO, Ada.Integer_Text_IO;
- ./invariant/exp.adb --
compute exponentiation illustrating loop invariants
- ./invariant/factorial.adb --
compute factorial illustrating loop invariants
- ./invariant/multiply.adb --
multiplying integers illustrating loop invariants
- ./invariant/odd.adb --
multiplying integers illustrating loop invariants
- ./invert/invert.adb --
with Matrix_Package;
- ./invert/invert.ads --
with Matrix_Package;
- ./invert/main.adb --
with Matrix_Package, Matrix_IO, Invert;
- ./invert/matrix_io.adb --
with Matrix_Package;
- ./invert/matrix_io.ads --
with Matrix_Package;
- ./invert/matrix_package.adb --
package body Matrix_Package is
- ./invert/matrix_package.ads --
package Matrix_Package is
- ./io/copy.adb --
copy standard input to output numbering lines
- ./io/echo.adb --
copy a file, character by character, to standard output
- ./io/palindrome.adb --
check standard input for palidroms
- ./io/prompt.adb --
prompt for input, convert to degrees/minutes, and loop
- ./io/random_rec.adb --
with Ada, Ada.Numerics.Discrete_Random, Ada.Numerics.Float_Random;
- ./io/random_rec.ads --
with Rec_Package;
- ./io/read_cd.adb --
read records from binary file
- ./io/read_ints.adb --
read integers from binary file
- ./io/read_rec.adb --
read different types from binary file
- ./io/rec_package.adb --
with Ada.Text_IO, Ada.Integer_Text_IO, Ada.Float_Text_IO;
- ./io/rec_package.ads --
package Rec_Package is
- ./io/write_cd.adb --
write records to binary file
- ./io/write_ints.adb --
write integers to binary file
- ./io/write_rec.adb --
write different types to binary file
- ./jacobi/jacobi.adb --
function to compute Jacobi symbol J(A,N)
- ./jacobi/main.adb --
program to compute Jacobi symbol of user input
- ./jacobi/test.adb --
program to compute Jacobi symbol of user input
- ./jotto/example.adb --
example program using Screen package
- ./jotto/jots.adb --
- ./jotto/screen.adb --
View ASCII terminal as 2D window using escape sequences
- ./jotto/screen.ads --
View ASCII terminal as 2D window using escape sequences
- ./jpl/jpl.adb --
with Ada.Text_IO, Ada.Command_Line;
- ./languages/discrete_set.adb --
generic package for sets of discrete elements
- ./languages/discrete_set.ads --
generic package for sets of discrete elements
- ./languages/translations-find_minimum.adb --
subunit to find small set of languages
- ./languages/translations-get_data.adb --
separate (Translations)
- ./languages/translations.adb --
use sets to determine minimum number of languages
- ./longup/longup.adb --
-- From Gries, "Science of Programming", §20.2
- ./loop/coconuts.adb --
- ./loop/code.ads --
package Code is
- ./loop/count.adb --
count the characters up to '#'
- ./loop/decode.adb --
program illustrating nested loop/exit
- ./loop/encode.adb --
- ./loop/fact.adb --
an Ada program fragment computing the factorial of the input
- ./loop/previous.adb --
an Ada program fragment to count same values in input
- ./loop/print_lowest_divisor.adb --
a procedure illustrating "while"
- ./loop/reach_goal.adb --
a procedure illustrating "loop"/"exit"
- ./loop/temperature.adb --
high and low temperatures over 24 hours
- ./loop/zero_count.adb --
an Ada program fragment to count zero characters
- ./low/convert.adb --
convert command line string in hex to number
- ./lower/lower.adb --
convert upper-case Latin-1 character to lower case
- ./lower/main.adb --
Ada program using several predefined libraries
- ./machine/machine_inventory-find_machine.adb --
separate (Machine_Inventory)
- ./machine/machine_inventory-new_machine.adb --
separate (Machine_Inventory)
- ./machine/machine_inventory.adb --
with Ada.Calendar, Ada.Direct_IO;
- ./math/math.adb --
some simple math functions
- ./matrix/main.adb --
transforming points using the package "Rigid_2D"
- ./matrix/rigid_2d.adb --
with Ada.Numerics.Elementary_Functions;
- ./matrix/rigid_2d.ads --
rigid 2D transformation using homogeneous coordinates
- ./moon/moonland.adb --
--------------------------------------------------------------------
- ./mort/loan.adb --
program to print amortization table for given loan
- ./names/german_ordering.adb --
with
- ./names/go1.adb --
with
- ./names/go2.adb --
with
- ./names/i18n-get_input.adb --
separate (I18n)
- ./names/i18n-sort.adb --
separate (I18n)
- ./names/i18n.adb --
with Ada.Text_IO, Ada.Integer_Text_IO; use Ada;
- ./names/i18n_outline.adb --
with Ada.Text_IO;
- ./names/names.adb --
with Ada.Text_IO, Ada.Integer_Text_IO;
- ./names/spanish_ordering.adb --
function Spanish_Ordering (Left, Right: String) return Boolean is
- ./obese/obese.adb --
with Ada.Text_IO, Ada.Integer_Text_IO, Ada.Float_Text_IO;
- ./obese/robust.adb --
with Ada.Text_IO, Ada.Integer_Text_IO, Ada.Float_Text_IO;
- ./objects/main.adb --
illustrate OO programming, dynamic dispatch, narrowing
- ./objects/objects.adb --
class of geometry objects
- ./objects/objects.ads --
class of geometric objects
- ./objects/shape_main.adb --
tagged records and classwide procedures
- ./objects/shapes.adb --
extent "Object" to point, circle, rectangle
- ./objects/shapes.ads --
extent "Object" to point, circle, rectangle
- ./overload/example_1.adb --
illustrate overloaded subprocedures
- ./overload/example_2.adb --
illustrate overloaded functions
- ./overload/largest.adb --
demonstrate overloading in Ada from Cohen, page 287 ff
- ./overload/multiple.adb --
illustrate overloaded subprocedures
- ./overload/overload.adb --
demonstrate overloading in Ada
- ./overview/concurrent.adb --
several tasks executing concurrently
- ./overview/except.adb --
program outline illustrating exception handling
- ./overview/generic_stack.adb --
Ada generic package implementation for stack
- ./overview/generic_stack.ads --
Ada generic package specification for stack
- ./overview/instance.adb --
generic package instantiation
- ./overview/main.adb --
an examble main program
- ./overview/overload.adb --
an example of overloaded procedures
- ./overview/parallel.adb --
illustration of parallel execution
- ./overview/rend.adb --
dynamic task creation, subprograms, and rendezvous
- ./overview/reverse_integers.adb --
use stacks to reverse input
- ./overview/stack_package.adb --
Ada package implementation for stack
- ./overview/stack_package.ads --
Ada package specification for stack
- ./overview/subclass.adb --
tagged records and classwide programming
- ./package/cd_package.ads --
CD information for reading and writing
- ./package/cd_read.adb --
read records from binary file
- ./package/cd_write.adb --
write records to binary file
- ./package/earth_orbit_data.ads --
common constants for earth orbit
- ./package/fibonacci_package.adb --
compute Fibonacci function using table lookup
- ./package/fibonacci_package.ads --
package to compute Fibonacci function
- ./package/junk.adb --
the body or implementation of the "Junk" package
- ./package/junk.ads --
the specification of the "Junk" package
- ./package/matrix_5.adb --
package body Matrix_5 is
- ./package/matrix_5.ads --
package Matrix_5 is
- ./package/order_main.adb --
with Order_Package;
- ./package/order_package.adb --
with Ada.Text_IO, Ada.Integer_Text_IO;
- ./package/order_package.ads --
package Order_Package is
- ./package/quantities.ads --
common constants in octal
- ./package/queue_client.adb --
example program using "Queues" package
- ./package/queues.adb --
queue package using pointers
- ./package/queues.ads --
queue package using pointers
- ./package/random.adb --
-- A crude source of random numbers 0 .. 2**12 - 1
- ./package/random.ads --
-- A crude source of random numbers
- ./package/sign_integer_package.ads --
abstract type of sign/magnitude integers
- ./package/test.adb --
with Quantities, Ada.Numerics.Generic_Elementary_Functions;
- ./package/tree_main.adb --
with Tree_Package;
- ./package/tree_package.adb --
with Ada.Text_IO, Ada.Integer_Text_IO;
- ./package/tree_package.ads --
package Tree_Package is
- ./package/trig_tables.adb --
with Ada.Numerics.Elementary_Functions;
- ./package/trig_tables.ads --
package Trig_Tables is
- ./package/twos_integer_package.ads --
-- An abstract data type for signed integers using twos complement
- ./package/use_junk.adb --
a client of the "Junk" package
- ./passing/association.adb --
illustrate parameter correspondence and default
- ./passing/main.adb --
with Ada.Text_IO, Ada.Integer_Text_IO;
- ./pasta/pasta-ov.adb --
with Text_IO, Direct_IO;
- ./pasta/pasta.adb --
with Text_IO;
- ./quad/quadratic.adb --
given user inputs compute roots of quadratic equations
- ./record/cd.adb --
using Ada records to represent audio CD info
- ./record/line.adb --
compute equation for line given two points
- ./record/overload.adb --
records, record aggregates and subprogram overloading
- ./record/rational.adb --
define record and functions for rational numbers
- ./record/records.adb --
examples of hierarchical records, arrays of records
- ./record/simple_records.adb --
examples of records for complex numbers and dates
- ./record/vector.adb --
records used in defining 3d vectors
- ./record/zero_one.adb --
records with zero and one subcomponent
- ./recurse/ack.adb --
library unit (function) to compute Ackermann's recurisvely
- ./recurse/add.adb --
addition by recursion
- ./recurse/add2.adb --
addition by recursion, simple version
- ./recurse/binary_search.adb --
recursive search for an element in a sorted array
- ./recurse/combinations.adb --
function to compute commbinations recursively
- ./recurse/display.adb --
with Ada.Text_IO;
- ./recurse/exponentiation.adb --
main program using recursive power function
- ./recurse/factorial.adb --
library unit (function) to compute factorial recursively
- ./recurse/fast.adb --
print a table of fast growing functions
- ./recurse/fib.adb --
main program using recursive Fibonacci function
- ./recurse/fractals.adb --
print fractal "landscape"
- ./recurse/hanoi.adb --
the classic Towers of Hanoi recursive program
- ./recurse/jeep.adb --
library unit (function) to find distance from desert oasis
- ./recurse/linear_search.adb --
recursive search for an element in an array
- ./recurse/main.adb --
compute distance jeep can travel from desert oasis
- ./recurse/split.adb --
a recursive function that splits in two
- ./recurse/tll.adb --
traverse a linked list, adding the notes
- ./root/cubic.adb --
-- cubic.adb
- ./root/root.adb --
-- root.adb
- ./root/sqrt.adb --
-- This function calculates an approximation of the square root
- ./runtime/access.adb --
the dynamic structure of pending calls
- ./runtime/blocks.adb --
the dynamic structure of block activations
- ./runtime/calls.adb --
the dynamic structure of pending calls
- ./runtime/nested.adb --
the dynamic structure of pending calls
- ./runtime/var_access.adb --
the dynamic structure of pending calls
- ./russell/main.adb --
procedure Main is
- ./search/binary_main.adb --
binary search of array
- ./search/insert_main.adb --
procedure Insert_Main is
- ./search/lexicographic.adb --
is the string "Left" < "Right"?
- ./search/main.adb --
with Ada.Text_IO, Ada.Integer_Text_IO;
- ./search/match_main.adb --
with
- ./search/order.adb --
with Ada.Text_IO, Ada.Integer_Text_IO;
- ./search/test.adb --
with Ada.Text_IO, Ada.Command_Line, Lexicographic;
- ./separate/dog.adb --
subprocedure to replace "dog" by "cat"
- ./separate/dogpatch.adb --
replace "dog" by "cat" in the command line
- ./separate/main-next_month.adb --
function to compute next month
- ./separate/main-put.adb --
print month, day, year (subunit of main)
- ./separate/main.adb --
illustrate subprocedure and function subunits
- ./ser/baron.adb --
Prim-Jarník algorithm for minimal spanning tree
- ./ser/bendy.adb --
with Ada.Text_IO, Ada.Integer_Text_IO;
- ./ser/binary.adb --
with Ada.Text_IO, Ada.Integer_Text_IO, Relationships;
- ./ser/binary_main.adb --
with Ada.Text_IO, Ada.Integer_Text_IO, Binary;
- ./ser/bit_set.adb --
generic package for sets of discrete elements
- ./ser/bit_set.ads --
generic package for sets of discrete elements
- ./ser/cards.adb --
with Ada.Text_IO, Ada.Integer_Text_IO;
- ./ser/cards.ads --
package Cards is
- ./ser/cards_main.adb --
with Ada.Text_IO, Ada.Integer_Text_IO, Cards;
- ./ser/cipher.adb --
with Ada.Text_IO;
- ./ser/cipher_main.adb --
-- "Substitution Cipher"
- ./ser/counter.adb --
with Ada.Text_IO, Ada.Integer_Text_IO, Discrete_Set;
- ./ser/counter_main.adb --
with Ada.Text_IO, Ada.Integer_Text_IO, Counter;
- ./ser/crisk.adb --
with Ada.Text_IO, Ada.Integer_Text_IO; use Ada;
- ./ser/decode.adb --
with Ada.Text_IO, Ada.Integer_Text_IO;
- ./ser/discrete_set.adb --
generic package for sets of discrete elements
- ./ser/discrete_set.ads --
generic package for sets of discrete elements
- ./ser/fold.adb --
with
- ./ser/fold2.adb --
with
- ./ser/isbn.adb --
-- ACM North-Central Regional Programming Contest 1994
- ./ser/jeep.adb --
with Ada.Text_IO, Ada.Integer_Text_IO, Ada.Float_Text_IO;
- ./ser/pizza.adb --
with Ada.Text_IO, Ada.Integer_Text_IO, Bit_Set;
- ./ser/pizza_2.adb --
with Ada.Text_IO, Ada.Integer_Text_IO;
- ./ser/pizza_main.adb --
with Ada.Text_IO, Ada.Integer_Text_IO, Pizza;
- ./ser/play.adb --
with Cards;
- ./ser/priority_queue.adb --
package body Priority_Queue is
- ./ser/priority_queue.ads --
generic
- ./ser/puzzle.adb --
with Ada.Integer_Text_IO, Ada.Text_IO, Unique;
- ./ser/relationships.adb --
package body Relationships is
- ./ser/relationships.ads --
generic
- ./ser/risk.adb --
with Ada.Text_IO, Ada.Integer_Text_IO, Crisk;
- ./ser/snack.adb --
with Ada.Text_IO, Ada.Integer_Text_IO;
- ./ser/test.adb --
with Ada.Text_IO, Ada.Integer_Text_IO, Intersection;
- ./ser/trains.adb --
with Ada.Integer_Text_IO, Ada.Text_IO;
- ./ser/unique.adb --
with Ada.Text_IO, Ada.Strings.Unbounded;
- ./ser/unique.ads --
package Unique is
- ./ser98/football.adb --
simulated game of simplified US football
- ./ser98/intersection.adb --
intersection of two line segments
- ./ser98/intersection.ads --
intersection of two line segments
- ./ser98/point.adb --
with Ada.Text_IO, Ada.Integer_Text_IO, Ada.Float_Text_IO;
- ./ser98/point_main.adb --
with Ada.Text_IO, Ada.Integer_Text_IO, Point;
- ./ser98/simple.adb --
determine if input sets are simple polygons
- ./ser98/xml.adb --
simple xml parser
- ./ser99/circle.adb --
-- "Crop Circles", area of interesecting circles
- ./ser99/circle_main.adb --
-- Main input loop for "Crop Circles"
- ./ser99/picture.adb --
-- "Get the Picture", decrypt a binary image from a pair of images
- ./ser99/picture_main.adb --
-- Main input loop for "Get the Picture"
- ./sort/main-insertion_sort.adb --
subunit for insertion sort
- ./sort/main-selection_sort.adb --
subunit for selection sort
- ./sort/main.adb --
with Ada.Text_IO, Ada.Integer_Text_IO;
- ./square/square.adb --
compute square of input; check for valid input
- ./stack/bounded_stack.adb --
generic data structure for stack
- ./stack/bounded_stack.ads --
generic data structure for stack
- ./stack/integer_stack.adb --
data structure for stack of integer elements
- ./stack/integer_stack.ads --
data structure for stack of integer elements
- ./stack/main.adb --
instantiation of generic bounded stack
- ./stack/postfix.adb --
read postfix expressions, evaluate and print result
- ./stack/unbounded_stack.adb --
generic package for stack data structure
- ./stack/unbounded_stack.ads --
generic package for stack data structure
- ./stack0/bounded_stack.adb --
generic data structure for stack
- ./stack0/bounded_stack.ads --
generic data structure for stack
- ./stack0/integer_stack.adb --
data structure for stack of integer elements
- ./stack0/integer_stack.ads --
data structure for stack of integer elements
- ./stack0/main.adb --
instantiation of generic bounded stack
- ./string/main-binary_search.adb --
subunit to search for string in array
- ./string/main.adb --
use binary search to find command-line arg in word list
- ./string/read.adb --
read in array of bounded strings from standard input
- ./string/simple.adb --
illustrate string slices and character concatenation
- ./sub/abstraction.adb --
Ada program illustrating subprocedures
- ./sub/analyze_main.adb --
compute average, variance of an array in a subprocedure
- ./sub/concat_main.adb --
operatator overloading
- ./sub/correspondence.adb --
Ada program illustrating subprocedures
- ./sub/decl.adb --
procedure P (X: in Integer) is
- ./sub/demo.adb --
illustrate parameter passing
- ./sub/even.adb --
illustrate functional abstraction
- ./sub/example.adb --
Ada program illustrating subprocedures
- ./sub/exercise.adb --
with Ada.Text_IO, Ada.Integer_Text_IO; use Ada;
- ./sub/formula.adb --
print the sum 1..N of powers 1, 2, 3, and 4
- ./sub/increment_list_main.adb --
procedure Increment_List_Main is
- ./sub/increment_main.adb --
a subprocedure with a default argument
- ./sub/largest_main.adb --
simple function used to compute magnitude
- ./sub/mode.adb --
procedure Look (X: in Integer) is
- ./sub/more_abstraction.adb --
Ada program illustrating functions
- ./sub/movie.adb --
illustrate default parameters
- ./sub/no_abstraction.adb --
Ada program illustrating subprocedures
- ./sub/psf.adb --
declare
- ./sub/repeat_main.adb --
illustrate default parameters
- ./sub/rewrite.adb --
Original: declare
- ./sub/side.adb --
two unrelated blocks illustrating side effects
- ./task/protect.adb --
with Ada.Text_IO, Ada.Integer_Text_IO;
- ./task/serialize.adb --
with Ada.Text_IO, Ada.Integer_Text_IO, Ada.Float_Text_IO;
- ./task/update.adb --
with Ada.Text_IO, Ada.Integer_Text_IO;
- ./telemetry/data_package.adb --
with Ada.Text_IO, Ada.Float_Text_IO;
- ./telemetry/data_package.ads --
package Data_Package is
- ./telemetry/read_data.adb --
- ./telemetry/rec_package.adb --
with Ada.Text_IO, Ada.Integer_Text_IO, Ada.Float_Text_IO;
- ./telemetry/rec_package.ads --
package Rec_Package is
- ./telemetry/sphere.adb --
with Data_Package;
- ./telemetry/sphere.ads --
with Data_Package;
- ./telemetry/write_data.adb --
- ./test/example.adb --
example program using Screen package
- ./test/exercise.adb --
with Ada.Text_IO, Ada.Integer_Text_IO; use Ada;
- ./test/ints.adb --
read and write integers
- ./test/main.adb --
a while loop that divides an interval in thirds
- ./test/period.adb --
compute period of a pendulum
- ./test/repeated.adb --
get integers until one of them equals the previous one
- ./test/scope_rule.adb --
procedure Scope_Rules is
- ./test/surface.adb --
lateral surface area of a right circular cone
- ./test/volume.adb --
library unit (function) to compute volume of a right circular cone
- ./transactions/main-solution.adb --
with Transactions, Transactions.Deposits, Transactions.Checks, Transactions.Interest;
- ./transactions/main.adb --
tagged records types and inheritence
- ./transactions/transactions-checks.adb --
with Ada.Text_IO, Ada.Integer_Text_IO;
- ./transactions/transactions-checks.ads --
package Transactions.Checks is
- ./transactions/transactions-deposits.adb --
- ./transactions/transactions-deposits.ads --
with Ada.Strings.Unbounded;
- ./transactions/transactions-interest.adb --
with Ada.Text_IO, Ada.Float_Text_IO;
- ./transactions/transactions-interest.ads --
package Transactions.Interest is
- ./transactions/transactions.adb --
- ./transactions/transactions.ads --
- ./tree/binary_search_tree.adb --
with Unchecked_Deallocation;
- ./tree/binary_search_tree.ads --
-- The elements in the tree are ordered from smallest to largest using
- ./tree/heap_package.adb --
implementation of a heap using an array
- ./tree/heap_package.ads --
implementation of a heap using an array
- ./tree/main.adb --
with Priority_Queue;
- ./tree/priority_queue.adb --
priority queue implemented using a heap
- ./tree/priority_queue.ads --
priority queue implemented using a heap
- ./tree/search.adb --
with Ada.Text_IO, Ada.Integer_Text_IO;
- ./unbounded/unbounded_strings.adb --
generic package implementing unbounded-length strings
- ./unbounded/unbounded_strings.ads --
generic package implementing unbounded-length strings
- ./update/create.adb --
with Ada.Text_IO, Ada.Integer_Text_IO, Ada.Float_Text_IO, Ada.Sequential_IO;
- ./update/update.adb --
with Ada.Text_IO, Ada.Integer_Text_IO, Ada.Float_Text_IO, Ada.Sequential_IO;
- ./variant/insidious.adb --
function Insidious return String is
- ./variant/vr.adb --
procedure vr is
- ./vectors/triplets.adb --
type for triples; used as base type of vectors
- ./vectors/triplets.ads --
type for triples; used as base type of vectors
- ./vectors/vectors.adb --
3-dimensional vector package derived from Triplets
- ./vectors/vectors.ads --
3-dimensional vector package derived from Triplets
- ./visible/example_1.adb --
scope rules and subprocedures
- ./visible/example_2.adb --
scope rules and blocks
- ./visible/main.adb --
illustrate the visibility of subprograms
- ./visible/scope.adb --
example of lexical scoping
- ./weather/chill.adb --
Compute wind chill given wind speed and temerature
- ./weather/wet.adb --
with Ada.Text_IO, Ada.Float_Text_IO;
- ./words/nice.adb --
compute "score" of words, print ever improving ones
- ./words/odd.adb --
compute "score" of words of all odd characters
- ./words/score.adb --
compute "score" of words, print ever improving ones
- ./words/words.adb --
compute "score" of words on standard input
Ryan Stansifer <ryan@cs.fit.edu>