'goto" gone from computer languages or is it!

Sean 'Captain Napalm' Conner spc at conman.org
Fri May 13 13:24:20 CDT 2005


It was thus said that the Great Bryan Pope once stated:
> 
> And thusly Mike Loewen spake:
> > 
> > On Fri, 13 May 2005, Bryan Pope wrote:
> > 
> > >>   So, to tie this in with the Zen Koan threads, what is the result of
> > >>
> > >> 	int i = 0;
> > >> 	printf("%d %d %d\n",i++,i++,i++);
> > >>
> > >
> > > IIRC it should output:
> > >
> > > 2 1 0
> > 
> >     Not on my system:
> > 
> > 0 1 2
> > 
> 
> I checked after I sent the message and my system output "2 1 0"...  I am 
> using Watcom C 10.6 under QNX 4.25.

I was replying to this statement from John Hogerhuis:

> I think the programming language is the most
> succinct, clear, and unambiguous specification language imaginable.
> Almost always each construct has one and only one interpretation. 

  And this is a perfect example of what I was trying to get across (and so
far, no one has stated the correct answer, yet both Bryan's and Mike's
compilers have produced a correct answer.  To add fuel to the conversation,
the IRIX 4.0.5 C compiler would produce

	0 0 0

which is also a correct answer.

  -spc (On topic, since this applies to C89 ... )





More information about the cctalk mailing list