'Break' and other ways out of loops - (nf)

grunwald at uiuccsb.UUCP grunwald at uiuccsb.UUCP
Sat Aug 27 12:30:58 AEST 1983


#R:ihuxq:-30200:uiuccsb:9000001:000:489
uiuccsb!grunwald    Aug 26 18:16:00 1983

   I've seen other languages which have a "label break", and it does make
it a lot easier. Using a "quisi-goto" is better, in my mind, then using a
goto. The limited form would tend to reduce the number of errors, I should
think.

The formats I've seen before (when properly Cified) are:

	/LABEL/ while ( Condition ) {
		    exit /LABEL/;
		}

		exit /LABEL/	-- this would cause an error -- no long in scope

					dirk grunwald
					university of illinois
					ihnp4 ! uiucdcs ! grunwald



More information about the Comp.lang.c mailing list