Department of Computer Science, St. Patrick's College, National University of Ireland, Maynooth, Co., Kildare, Ireland
Abstract:
The termination-indicator technique is presented, which can be used to solve the class of multi-exit loop problems. A multi-exit loop problem is a programming problem that has several terminating conditions for a loop: either a loop will run through a full cycle or be terminated prematurely when some condition is met. The class of multi-exit loop problems has generated a great deal of controversy on the goto statement in the literature from time to time. The paper illustrates the generality and efficiency of the termination-indicator technique by applying it to the class of multi-exit loop problems and thus puts the goto controversy to rest.