Maurice Lombardi wrote:
either passed by value or by reference, for optimisation purposes, and this is checked in the programs cstpar1.pas / cstpar2.pas of the test suite. Now both a value parameter or a var parameter is OK, only const complains.
I am new here, but an old hand at Pascal and Pascal implementation.
Will somebody please explain why this 'const' extension exists at all? A non VAR parameter is always passed by value, so the original cannot be modified. Thus I see absolutely no purpose to it.
For performance reasons I think, specially with larger structures.
Newer Delphi's also have an OUT extension. (writeonly) to complete the number of possibilities. The reasons for that are afaik related to the Windows Api.