[fpc-pascal] Default record const values

Sven Barth pascaldragon at googlemail.com
Mon Nov 12 07:51:02 CET 2018

Am Mo., 12. Nov. 2018, 02:56 hat Ryan Joseph <ryan at thealchemistguild.com>

> > On Nov 12, 2018, at 8:08 AM, Ryan Joseph <ryan at thealchemistguild.com>
> wrote:
> >
> > But this syntax worked if you assigned it within blocks. Why does it
> need to be removed? Since I discovered it I was planning on using it
> instead of class functions with default values which require an
> implementation and are much longer to write.
> Here’s an example of what I was doing before. A constant is so much better
> and doesn’t require the implementation and we still get the same . syntax,
> i.e., TPoint.Up.
> Instead of removing it maybe give the error unless it’s the last field of
> the record and in which case can assumed to be fully defined.

No, that is too random for a language.
This change is not up for discussion as it could lead to incorrect code.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20181112/9586e900/attachment.html>

More information about the fpc-pascal mailing list