Using coroutines in pascal |
| |
Authors: | I A Horton S J Turner |
| |
Affiliation: | Department of Computer Science, University of Exeter, Exeter EX4 4PT |
| |
Abstract: | Coroutines are routines which communicate with each other in a more general way than that provided by the normal subroutine mechanism. Although they have many potential applications, their use has been restricted by their lack of availability in common high-level languages. This paper discusses some of the issues involved in implementing coroutines, and proposes an implementation written in Pascal which may be incorporated into a Pascal program to give coroutine facilities. Use of the system is illustrated by two solutions to the N-Queens problem by different coroutine strategies. The basic system is then extended to allow more advanced use of coroutines. |
| |
Keywords: | Coroutines Pascal Portability |
|
|