[fpc-devel] FPC Delphi compatibility question...

Maxim Egorov m.v.egorov at hotmail.com
Fri Jun 19 12:01:25 CEST 2009


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. So the 
expected behavior is:
1) the result value must be nil
2) the compiler must show warning "function needs return value"

P.S. Delphi doesnt return nil and doenst show warning.



More information about the fpc-devel mailing list