Theory of Pure C, chapter 937

utzoo!decvax!harpo!floyd!vax135!ariel!houti!lime!we13!burl!WIN!we53!glm utzoo!decvax!harpo!floyd!vax135!ariel!houti!lime!we13!burl!WIN!we53!glm
Tue Dec 28 02:16:45 AEST 1982


I'm not a C expert but in reference to the question of the result of

		foo(x++)

giving x or x incremented to the function foo(), consider the following:

		foo(x++ * x)

I would hope that x times x incremented would be sent to the function.

The increment should be after x is considered in the complex expression,
but everything should be done before the function is called.  For this to
work, the simple expression must also work the same way.  Therefore an
incremented x must be sent to the function.

					Gary Mann (we53!glm)



More information about the Comp.lang.c mailing list