home *** CD-ROM | disk | FTP | other *** search
- BANK DEMO 3
-
- A Demonstration of Tasking in Ada
- Version 1.0, 11 March 1989
-
- by
- Richard Conn
-
-
- Bank Demo 3, or BD3 as the files and mainline procedure are named, is a
- demonstration program which illustrates how Ada and its tasking mechanism can
- be used to create a model of an activity in the real world. BD3 is a model of
- a bank, where the bank contains several tellers, implemented as Ada tasks, and
- is used by customers, also implemented as Ada tasks. The user at the console
- can monitor the status of the bank and the accounts of its customers and cause
- more customer tasks to execute, thereby increasing the level of activity at
- the bank. The tasks all operate in parallel, so a variety of events can be
- thought of as happening at the same time, controlled by the Ada runtime system
- which is built into the Ada program by the Ada compilation system.
-
- This document and the associated software are presented as an
- introduction to the Ada language and its tasking capabilities. While the
- author attempted to make this document as easy to follow as possible, a
- limited knowledge of Ada is assumed. Variable assignments, type definitions,
- and procedure and package specifications are presented in correct Ada syntax
- without much explanation. If this proves to be a problem, the ADA-TUTR
- shareware program will help a lot in bringing the user up to date with an
- understanding of Ada syntax. Regardless, the program in the file BD3.EXE can
- be run without any knowledge of Ada at all, and the tasking demonstration can
- be observed.
-
- Figure 25 shows the files provided in the distribution of Bank Demo 3.
- This document is in one-column format.
-
- ======================================================================
-
- READ.ME An introduction to the distribution
- PRINT.ME This document, ready to be printed as ASCII
- text on 8 1/2" x 11" paper in elite type
- BD3.SPR Source (in Borland's SPRINT) to the file PRINT.ME
-
- CONSOLE.ADA Compilable Ada source code to package CONSOLE
- RANDOM.ADA Compilable Ada source code to package RANDOM
- BD3.ADA Compilable Ada source code to packages BANK
- and CUSTOMER_WORLD and procedure BD3
- Note: the compilation order is CONSOLE.ADA,
- RANDOM.ADA, and BD3.ADA
-
- CONSOLE.LST Listing of CONSOLE.ADA with each line numbered
- RANDOM.LST Listing of RANDOM.ADA with each line numbered
- BD3.LST Listing of BD3.ADA with each line numbered
-
- BD3.EXE Executable binary of the BD3 system (run by
- giving the command "BD3" at the MSDOS prompt)
-
- Figure 25: Files Distributed as Part of Bank Demo 3
-
- ======================================================================
-