A brace vs. indentation hypothesis (was Re: Braces are not Compiler-Fluff.)

Blair P. Houghton bph at buengc.BU.EDU
Fri Jan 13 03:45:56 AEST 1989


In article <2695 at ficc.uu.net> peter at ficc.uu.net (Peter da Silva) writes:
>Now me, I do this:
>
>	if (p != 0 &&
>	    p->barp != 0 &&
>	    p->barp->type == BAR_BAZ_TYPE)
>	{
>		debazify(p->barp);
>		saltpork(p);
>	}

I've added a bit below that makes the syntax of the above radically different,
and a red herring (maltjes, I think... :-) ):

Your mission, if you decide to accept it, is to imbed this smidgen of
code in the third include-file from the top and find the critical error
in the ten-seconds-before-yesterday your tyrannical boss gave you to do
it...

	if (p != 0 &&
	   p->barp != 0 &&
	   p->barp->type == BAR_BAZ_TYPE);
	{
		debazify(p->barp);
		saltpork(p);
		hungryrabbi(p);
	}

				--Blair
				  "Hint:  keep those braces as close
				   to their related syntactic element
				   as possible, or yer FIRED!.  Well, not
				   fired, per se, but I'll leave coding the
				   bitmaps for you to do..."



More information about the Comp.lang.c mailing list