On 09/29/2016 06:06 AM, Sven Barth wrote:
Am 29.09.2016 11:34 schrieb "Martin Schreiber" <mse00...@gmail.com
<mailto:mse00...@gmail.com>>:
On Thursday 29 September 2016 10:49:03 Graeme Geldenhuys wrote:
> On 2016-09-29 06:42, Martin Schreiber wrote:
> > abcintf:= iabc(abc);
> > "
> > which has the best performance.
>
> But you must still remember to check if abcintf has been successfully
> assigned.
>
There will be a compiler error if "abc" does not implement "iabc".
Graeme meant that abc can still be Nil.
Or perhaps, var abc : TObject (or some other descendent passed as a
variable) -- it may or may not support iabc, but we want to check, and
do something with it if it does.
~David
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal