Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!samsung!aplcen!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.std.c Subject: Re: Scope of switch statements Message-ID: <11607@smoke.BRL.MIL> Date: 15 Nov 89 23:02:14 GMT References: <15743@bloom-beacon.MIT.EDU> <1989Nov9.200639.8868@utzoo.uucp> <1989Nov14.104203.26192@gdt.bath.ac.uk> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 8 In article <1989Nov14.104203.26192@gdt.bath.ac.uk> exspes@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.