'goto" gone from computer languages or is it!

Eric J Korpela korpela at gmail.com
Sun May 15 18:05:24 CDT 2005


On 5/13/05, Paul Koning <pkoning at equallogic.com> wrote:

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

> I think the answer is that it should display 3 numbers, each in the
> range 0 to 2.

That is the "likely" answer.  (Actually I'd say that the "likely"
answer is that it prints three numbers in the range 0 to 2 and
afterwards the value of i is in the range 1 to 3)

There is no "should" answer.  A compiler can do whatever it wants with
this code including generating an exception, printing the Gettysburg
address, and the aforementioned nasal demons.

Eric



More information about the cctalk mailing list