> On Jul 22, 2018, at 6:22 PM, Ben Grasset <operato...@gmail.com> wrote:
> 
> Also, one other thing: you should really be specifying the right-hand-side 
> array parameter as "const" there. If you don't, it will be copied in its 
> entirety instead of being passed by reference. Basically just always pass 
> everything as "const"  (or "constref" if it's specifically a record) unless 
> you literally can’t.

Yeah sounds like a bug but I’ll wait for one the compile guys to verify that.

I belive I was told that const doesn’t actually perform any optimizations but 
constref does (for structs yes). I hope that’s right because I don’t want to 
feel an urge to type “const” every time I write a function. Honestly I don’t 
think I’ve ever used const but just  started using constref last year when I 
learned about it for the first time (good feature when ever it was added).

Regards,
        Ryan Joseph

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to