On 07 Jun 2010, at 16:59, Marcos Douglas wrote:

Well... just to I will know. A long time ago (Delphi 4) I learned:
Always use 'const' for 'strings' because this is faster. Strings will
be passed by reference.

It can be faster to pass very short strings by value instead of by reference. That's why "const" does not specify how a parameter is passed.

This remains true?

What you can count on is that a "const" parameter should never be slower than a regular value parameter. How exactly it is implemented is however something you have no control over.


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

Reply via email to