🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #912

Re: Scope of switch statements

#912
From: Doug Gwyn
Date: Wed, 15 Nov 1989 23:02
8 lines
998 bytes
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.
Technical Details
Message-ID: <11607@smoke.BRL.MIL>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!samsung!aplcen!haven!adm!smoke!gwyn
References: <15743@bloom-beacon.MIT.EDU> <1989Nov9.200639.8868@utzoo.uucp> <1989Nov14.104203.26192@gdt.bath.ac.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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