[fpc-pascal] Open array in object constructor gives error
Sven Barth
pascaldragon at googlemail.com
Tue Jan 3 14:41:49 CET 2023
Hairy Pixels <genericptr at gmail.com> schrieb am Di., 3. Jan. 2023, 14:07:
>
>
> > On Jan 3, 2023, at 3:12 PM, Sven Barth <pascaldragon at googlemail.com>
> wrote:
> >
> > But then you don't use the type name either. You simply do
> "o.Create(...)".
> >
>
> Ohhhh I get it now. I didn’t realize you couldn’t create on the type. That
> breaks my entire design then. It would be great to have a modern object
> that behaved more like classes but on the stack (like C++ does).
>
In C++ you can't use polymorphism either if the class is allocated on the
stack, so TP-style objects and C++-classes behave the same here.
Regards,
Sven
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20230103/b764b15b/attachment.htm>
More information about the fpc-pascal
mailing list