The final word on GOTO (Don't I wis

Wm E Davidsen Jr davidsen at crdos1.crd.ge.COM
Sat Oct 7 01:49:39 AEST 1989


In article <4447 at buengc.BU.EDU>, bph at buengc.BU.EDU (Blair P. Houghton) writes:

|  I'd go out of my way to fix it so that I could just do
|  
|  	switch(format_char) {
|  	    case 'd': the stuff I put under d; break;
|  	    case 'o': the stuff I put under o; break;
|  	    case 'x': the stuff I put under x; break;
|  	    case 'u': the stuff I put under u; break;
|  	}
|  
|  	the stuff I put under donum;

  This doesn't do the same thing at all. In the original the "donum:"
code was only executed if a case was matched in the switch. Your example
executes it everytime. As you mentioned but didn't show you would have
to define a bunch of flags and stuff to make this work.
-- 
bill davidsen	(davidsen at crdos1.crd.GE.COM -or- uunet!crdgw1!crdos1!davidsen)
"The world is filled with fools. They blindly follow their so-called
'reason' in the face of the church and common sense. Any fool can see
that the world is flat!" - anon



More information about the Comp.lang.c mailing list