Scope of switch statements

Doug Gwyn gwyn at smoke.BRL.MIL
Thu Nov 16 10:02:14 AEST 1989


In article <1989Nov14.104203.26192 at gdt.bath.ac.uk> exspes at gdr.bath.ac.uk (P E Smee) writes:
>In particular, if you branch (via the switch) to one of the cases
>inside the {}'s of the for, are you then under control of the for?

In C you may always branch to a label within a control construct such
as the body of a "for" statement, whether or not a "switch" is involved.
The associated semantics are fairly obvious if you grok the notions of
labels, identifier scopes, and initialization of variables.



More information about the Comp.std.c mailing list