Am 25.06.2016 09:23 schrieb "Maciej Izak" <hnb.c...@gmail.com>:
>
> 2016-06-25 5:19 GMT+02:00 Michalis Kamburelis <michalis.ka...@gmail.com>:
>>
>> They were never guaranteed to be initialized to nil.
>
>
> Result has special logic for string, dynamic array, method pointer and
variant (well documented ;) ):
>
> "For a string, dynamic array, method pointer, or variant result, the
effects are the same as if the function result were declared as an
additional var parameter following the declared parameters. In other words,
the caller passes an additional 32-bit pointer that points to a variable in
which to return the function result."
>
>
http://docwiki.embarcadero.com/RADStudio/Berlin/en/Program_Control#Handling_Function_Results

And them being var-parameters basically states that they retain whatever
value they had.

Regards,
Sven
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to