On Wed, 2 Jul 2014 11:23:33 +0200, Jonas Maebe <jonas.ma...@elis.ugent.be> wrote: > > As has been mentioned earler in the thread, MyReturnStr itself is a > pchar. >
Sorry, I had to recheck thred multiple times before I found it. Initially he did not mention the type at all. Anyway, if variable is of type PChar, then there is not reason to take an address of first element to pass it to PChar. Passing wariable itselt is much clearer. And for ansistring MyReturnStr casting it to PChar would have worked also. After setting it to required length with SetLength. -- Virgo Pärna virgo.pa...@mail.ee _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal