break, continue, return, goto

Ron Natalie <ron> ron at brl-smoke.ARPA
Tue Jan 21 05:20:35 AEST 1986


> > BREAK, RETURN AND CONTINUE ARE NOT THE SAME AS GOTO, FOLKS.  IF THEY WERE,
> > THEY'D ALL BE CALLED "GOTO".
> 
> More fuel. I just (Wednesday) went through & put gotos into the main
> program of all my little utilities. Why? Because "break" doesn't work
> the same way as continue when you're inside a switch.

Wonderful, break never works the same way as continue, or else they'd
be called the same thing.

It is possible to do terribly unstructured things with GOTO, BREAK,
RETURN, and CONTINUE, but one should not attempt to enforce structured
programming at the language level because it won't work.  You can
write structured code in any language, and real programmers can code
Fortran programs in any language as well.

-Ron



More information about the Comp.lang.c mailing list