comp.lang.c
[Top] [All Lists]

Re: Implementation-defined behaviour

Subject: Re: Implementation-defined behaviour
From: Harald van Dijk
Date: Sat, 29 Mar 2008 12:57:39 +0100
Newsgroups: comp.lang.c

On Sat, 29 Mar 2008 08:10:44 +0000, Flash Gordon wrote:
>>>> Ioannis Vranos wrote:
>>>>> K&R2 mentions the following:
>>>>>
>>>>> "printf("%d %d\n", ++n, power(2,n));   /* WRONG */
> [snip]
> 
> So in the above evaluating the parameters to the power function is
> explicitly *required* to take place before the sequence point of calling
> the function.

Evaluation of the parameters is not possible until power is actually 
called, but evaluation of the arguments must take place earlier. :-)

<Prev in Thread] Current Thread [Next in Thread>
Privacy Policy