initialization following switch
Henry Spencer
henry at utzoo.uucp
Thu Apr 6 01:52:14 AEST 1989
In article <8348 at xanth.cs.odu.edu> kremer at 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 at zoo.toronto.edu
More information about the Comp.lang.c
mailing list