On 10/28/2013 02:47 PM, Dmitry Pribysh wrote:
As it is written in Free Pascal wiki
<http://wiki.freepascal.org/Code_Conversion_Guide#Order_of_parameter_evaluation>,
order of parameter evaluation is not defined in FPC, but it is defined
in Delphi (Delphi guarantees left-to-right evaluation order).
IMHO =in fact evaluation of a parameter should not be guaranteed at all.
The compiler should be free to inline a function, detect that the
parameter is not necessary for the evaluation of the function result and
drop the evaluation of the parameter (maybe giving a warning or error
message if that might trigger side-effects).
-Michael
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal