[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: expressions vs. statements



kragen wrote:
> The particular problem I brought up, which Pixel corroborated, is that
> a function in Perl or C whose primary purpose is to have side effects
> nevertheless returns a value, the value of the last expression it
> evaluates.

is that really true for C?

don't have the specification within reach, but I'm pretty
sure it says that the return value is *undefined*.

(to be precise, I think it says that if you attempt to use the
return value from a function that doesn't explicitly return a
value, the behaviour is undefined.  in other words, anything
can happen...)

</F>