Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site brl-tgr.ARPA
Path: utzoo!linus!philabs!cmcl2!seismo!brl-tgr!gwyn
From: gwyn@brl-tgr.ARPA (Doug Gwyn )
Newsgroups: net.lang.c
Subject: Re: Re: Breaking out of several nested loops (& ANSI C)
Message-ID: <5316@brl-tgr.ARPA>
Date: Mon, 15-Oct-84 20:25:16 EDT
Article-I.D.: brl-tgr.5316
Posted: Mon Oct 15 20:25:16 1984
Date-Received: Wed, 17-Oct-84 19:33:38 EDT
References: <129@ssc-vax.UUCP>, <1801@pegasus.UUCP> <4886@duke.UUCP>, <2085@rochester.UUCP>, <4901@duke.UUCP>
Organization: Ballistics Research Lab
Lines: 16

Gee, I thought everyone knew that the most general structured loop is
	startloop
		...
		on condition (...) leaveloop
		...
	repeatloop
which can mimic a "while" or "do .. while" loop if one or the other
of the body sections is null.  The rules for "structuredness" seem
to be: a loop invariant is being maintained (and is stated EXPLICITLY,
perhaps in a comment), the loop is entered at the top, and there is
only one exit from the loop.  C's "break" and "continue" violate this
just as much as a "goto" would.  But so what; a conscientious
program designer will "think structured" no matter what language he
is using.  I have yet to see an automated tool (including ADA) for
enforcing proper programming practice that can compensate for ignorance
or stupidity on the part of its user.