[fpc-devel] FPC Delphi compatibility question...
florian at freepascal.org
Fri Jun 19 13:21:33 CEST 2009
Jonas Maebe schrieb:
> On 19 Jun 2009, at 12:01, Maxim Egorov wrote:
>> Micha Nelissen пишет:
>>> Since the return value is undefined, anything is possible:
>>> * calculate crc32 over executable
>>> * random value from stack
>>> * do nothing at all
>> It's not true in the case of functions that return dynamic arrays,
>> strings or interfaces. Because of these types require special
>> finalization and they must be initialized to nil by default.
> That is an implementation detail, and not something you can rely on as
> far as semantics are concerned.
Variables of those types are initialized to nil at scope entry. I'd
consider result as variable.
More information about the fpc-devel