On Fri, 25 Feb 2011, leledumbo wrote:

is it allowed ?

Yes, but watch out that is/as operator might not work as expected.

can i pass ansistrings ?

Yes, but only if you know what you're doing. NEVER modify the passed strings
(it would confuse the reference counting). Use const parameter all the time.

It will almost certainly lead to memory leaks, because a simple
a:=b;
inside the library with b passed on from the main program, will lead to problems as soon as the library is unloaded.

This is also true for strings that are properties of objects.

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

Reply via email to