[b]Order of parameter evaluation[/b]
Delphi guarantees that all parameters are evaluated from left to right.
FPC makes no such guarantee, and can evaluate parameters in any
order it wants in order to generate optimal code.
Hello Winni, thank you for that reference. I searched the user's guide and the programmer's guide and didn't find that information there. It might be a good thing to add to either manual.
Not to nitpick but, parameter evaluation and parameter validation are not the same thing. When the compiler is parsing the source code it is _validating_ and, it normally does that either left to right or right to left depending on the choice of algorithms. Once the parameters are validated (e.g, types match and references match - i.e, var/values) then the compiler is free to evaluate however it wants. (that said, it usually does both simultaneously... oh well.)
At any rate, it would be nicer if errors where reported left to right whenever possible. That would avoid getting an error on parameter n then an error on parameter (n-1) in the following compile (that said, cultures that read right to left might consider it a nice feature
)