On Mon, Jun 7, 2010 at 12:11 PM, Jonas Maebe <jonas.ma...@elis.ugent.be> wrote: > > 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.
In others words, the compiler choice, right? >> 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. Even variable different of string? Marcos Douglas _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal