ppadilcdx--- via fpc-pascal <fpc-pascal@lists.freepascal.org> schrieb am
Mo., 2. Jan. 2023, 02:29:

> Sorry copy and paste error. d = decode. Corrected below.  But I think I
> see what you mean.  Just assigning a type to decode doesn't initialize
> it. But the compiler is happy with it, i.e. it doesn't call as illegal
> the statement "decode.create".
>

That is because constructors can also be called as regular methods. But the
instance will only be created if you call a constructor using the type.

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

Reply via email to