Bart via fpc-devel wrote:

"Note that in general, it should only be used for interfacing with
external code or when writing assembler routines."

That is wrong. It should read

"A const parameter is be passed by reference or (for small-sized parameters) by value, whatever is most efficient. A constref parameter is guaranteed to be passed by reference in all cases. The latter is therefore typically used for interfacing with external code or when writing assembler routines."

In your case, constref is the right choice, although const would be fine also (as your datastructure is larger than a small number of bytes).

Regards,

Adriaan van Os

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to