Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/5/84; site ssc-vax.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!mhuxj!houxm!vax135!cornell!uw-beaver!ssc-vax!buls
From: buls@ssc-vax.UUCP (Rick Buls)
Newsgroups: net.lang.c
Subject: Re: Re: Breaking out of several nested loops
Message-ID: <129@ssc-vax.UUCP>
Date: Wed, 3-Oct-84 17:45:23 EDT
Article-I.D.: ssc-vax.129
Posted: Wed Oct  3 17:45:23 1984
Date-Received: Thu, 4-Oct-84 10:18:05 EDT
Distribution: net
Organization: Boeing Aerospace Co., Seattle, WA
Lines: 46



>> The correct way to break out of multiply nested control constructs (using the
>> example in the referenced article) without using 3 separate boolean flags is:
>> 
>> 	i=1;
>> 	while(...){
>> 		...
>> 		for(...;...;...){
>> 			...
>> 			switch(...){
>> 				...
>> 				goto Out;
>> 			}
>> 		}
>> 	}
>> Out:	i=2;
>> 
>> 

	Very UNstructured!!!!!!!!!!

	Try the following:
   	i=1;
	struct(????);
	i=2;
	...
struct(????)
	...
{
	...
   	while(...){
   		...
   		for(...;...;...){
   			...
   			switch(...){
   				...
   				return;
   			}
   		}
   	}
}
   


   where ???? is what ever parameters are needed!!!!