Am 31.12.2014 um 21:51 schrieb Marco van de Voort:

Afaik the problem is that "const" as used in classic delphi is not very portable. In theory it is specified as immutable (can't be modified), but widely abused to mean "by reference".
Const parameters exist for optimization, the compiler is allowed to pass them by reference instead of a copy.
This happens to be the case for x86 ABIs, but this is not portable (which why FPC introduced constref)
I don't see how this is not portable - as long as the procedure is OPL. External procedures of other languages don't leave room for such an optimization, even in x86 ABIs, that's why constref was introduced for them.

DoDi

--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to