"Break" and other ways out of loops and switches

crandell at ut-sally.UUCP crandell at ut-sally.UUCP
Thu Aug 25 09:32:21 AEST 1983


     I cast a strong vote in favor of that proposition.  Incidentally, if
you're interested in discovering another language (a small and very
orderly one) that incorporates that feature, look at REPORT ON THE
PROGRAMMING LANGUAGE PLZ/SYS by Snook, Bass, Roberts, Nahapetian and Fay
(Springer-Verlag, 1978).  You'll probably notice that PLZ/SYS doesn't
have a GOTO, and the loop-break statement EXIT (probably from DEC Pascal)
plus the RETURN statement (from FORTRAN -- no, it's not the same as the
C version) have substantially obviated it.
     It seems reasonable that loop labels are somewhat "safer" than
statement labels, since they are more difficult to dislocate.  I haven't
heard any Certified Programming Moralists rule on it, however.



More information about the Comp.lang.c mailing list