[fpc-pascal] Default record const values
pascaldragon at googlemail.com
Sat Nov 10 14:21:16 CET 2018
Am Sa., 10. Nov. 2018, 12:44 hat Ryan Joseph <ryan at thealchemistguild.com>
> Not quite understanding how that’s not entirely parsed by the time you
> assign outside of the record. Even so I would expect it to copy what the
> const was able to capture, fully parsed or not.
It's not entirely parsed by the time the constant is declared. That is
simply illegal code.
> Also, why does it work to do
> r := TMyRecord.default;
> in the main block?
It's not possible to use typed constants as initializers for variables.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal