Is an argument to break, continue a bad idea?

Peter Miller peter at neccan.oz
Tue May 1 00:08:45 AEST 1990


in article <2647 at mica6.UUCP>, henley at motcid.UUCP (Aaron Henley) says:
> I always thought a BREAK statement was equivalent to a GOTO
> statement but the compiler sets up the labels.   For those
> who don't like the use of GOTO in their code you shouldn't
> like the BREAK either.  Try looking at your assembly output!
> I did a diff on the .i files using a break compared to a goto and the
> only difference was the label name.
Oh, come on!  I could paraphrase it as
"I always thought an IF statement was equivalent to a GOTO
statement but the compiler sets up the labels.   For those
who don't like the use of GOTO in their code you shouldn't
like the IF either.  Try looking at your assembly output!"

You are forgetting that structured programming is a TOOL.
Too many treat it as dogma.  And we all hate bigots.

GOTOs are essential to algorithms.  Just because you choose
to use a language construct which hides them does not
alter the fact that they are there.
The only question I ever ask about a goto is
"Is it more maintainable/understanable/readable to use a goto
or not to use a goto?"
I try to avoid the dogma.

Regards
Peter Miller       UUCP    {uunet,mcvax,ukc}!munnari!neccan.oz!pmiller
                   ARPA    pmiller%neccan.oz at uunet.uu.net
/\/\*              CSNET   pmiller%neccan.oz at australia
                   ACSnet  pmiller at neccan.oz
Disclaimer?  These guys have no idea what I am on about!
D



More information about the Comp.std.c mailing list