[fpc-pascal] Mozilla XPCOM

Luiz Americo Pereira Camara luizmed at oi.com.br
Tue Jun 8 03:35:20 CEST 2010


Marcos Douglas escreveu:
>
> 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. This remains true?
>
> eg:
>
> var str: string;
>
> procedure Foo1(const s: string);
> procedure Foo2(s: string);
>   

Take a look at 
http://lazarusroad.blogspot.com/2008/11/effect-of-using-constant-parameter-for.html

Luiz



More information about the fpc-pascal mailing list