© 1986 by British Computer Society
| ||||||||||||||||||||||||||||||||||||||||||||||||||
The Use of Termination Indicators in Computer Programming
Department of Computer Science, University of Western Australia, Nedlands, WA 6009, Australia
A simple programming technique called the termination-indicator technique is introduced. The basic idea is to use variables as termination indicators in multi-exit loops in order to simplify termination conditions of loops. Numerous examples are given illustrating elegant, efficient an structured solutions that benefit from this technique. Comparative results show that the termination-indicator technique is superior and more versatile than other programming techniques using cand/cor, sentinel and state-variables.
Received August 1984.
* Department of Computer Science, University of Western Australia, Nedlands, WA 6009, Australia