What's the order of argument evaluation for functions

Jens Mueller jens.k.mueller at gmx.de
Wed Apr 27 13:22:45 PDT 2011


Hi,

on page 50 TDPL states
"All arguments are evaluated left to right before fun gets invoked."
That means
int i;
writeln(++i, ++i);
is supposed to print
"12".
and is valid.
But on http://www.digitalmars.com/d/2.0/expression.html
func(++i, ++i);
is defined as an error.
Is the evaluation order for function calls undefined or it is left to
right?

Jens


More information about the Digitalmars-d mailing list