'goto" gone from computer languages or is it!

Tom Jennings tomj at wps.com
Sat May 14 20:04:47 CDT 2005


> >> >> int i = 0; >> printf("%d %d %d\n",i++,i++,i++);


> >> > IIRC it should output:

>>>>>>>>>> AD NAUSEUM


Hey, WTF, over?! I thought you guys were all programmers?

The answer is: UNDEFINED. What it will print is UNDEFINED. Good
old K & R warns you of SIDE EFFECTS, most specifically
stupid-human assumptions about the order of evaluation.

Sheesh!


Try writing a portable printf(). Good luck!



More information about the cctalk mailing list