switch break

Bill Poser poser at csli.Stanford.EDU
Wed Oct 3 03:19:25 AEST 1990


I'm curious about the problem some people apparently have
with the fall-through property of switch. I've never had the
slightest difficulty with this, even when I was first learning
C. Modestly putting aside the attractive hypothesis that I am
a genius at learning programming languages, I wonder if
the people who have a problem are those who have previously
learned a similar construction in a language that lacks fall-through,
such as the Pascal case statement? When I learned C, I knew Fortran
(Fortran IV, the real thing, not something semi-modern like F77),
a bit of BASIC, MIX assembler (only on paper), and the assembler
for an obscure Japanese laboratory minicomputer. None of these
had anything like switch, so I had no preconceptions about how
it should work. But an awful lot of people these days come to
C after learning Pascal. Are they the people who are having
trouble with this?

						Bill



More information about the Comp.lang.c mailing list