On 4-8-2022 07:40, Michael Van Canneyt via fpc-devel wrote:
It's best to use pointers, but you can always provide overloads with var
arguments.
IIRC it is best to not do this automatically for functions with two such
cases (two by ref, so var or pointer parameters).
This because small programming mistakes then often trigger "can't
determine which overloaded function to call", which is often confusing
for people.
In the Windows headers (rtl/win/wininc and winunits*) I therefore only
overload with VAR when it is needed for some compatibility reasons
(either FPC self compatibility or Delphi)
_______________________________________________
fpc-devel maillist - [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel