Newsgroups: comp.lang.c Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: initialization following switch Message-ID: <1989Apr5.155214.29006@utzoo.uucp> Organization: U of Toronto Zoology References: <8348@xanth.cs.odu.edu> Date: Wed, 5 Apr 89 15:52:14 GMT In article <8348@xanth.cs.odu.edu> kremer@cs.odu.edu (Lloyd Kremer) writes: > Initializing a variable after the opening brace of a switch does not > work... > Is this the pANS conformant behavior? I'm sure it is, but I don't > have a copy to verify it. Yes. It's well-hidden, unlike in K&R1 which mentioned it under "switch", but the Oct draft says explicitly that initializations don't get performed when the block is entered by a jump into the middle (which is what a switch does). -- Welcome to Mars! Your | Henry Spencer at U of Toronto Zoology passport and visa, comrade? | uunet!attcan!utzoo!henry henry@zoo.toronto.edu