[fpc-pascal] Union followed by Property does not compile !

Martin Frb lazarus at mfriebe.de
Wed Aug 3 13:09:24 CEST 2022

On 03/08/2022 12:41, wkitty42--- via fpc-pascal wrote:
> On 8/2/22 5:12 AM, Michael Van Canneyt via fpc-pascal wrote:
>> The variant part of a record must always come last.
> FWIW: is this documented somewhere easily found?
free pascal language reference


and read up on "record"
> The variant part must be last in the record. The optional identifier 
> in the case statement serves to access the tag field value, which 
> otherwise would be invisible to the programmer. It can be used to see 
> which variant is active at a certain time^3 
> <https://www.freepascal.org/docs-html/ref/refsu15.html#fn3x4>. In 
> effect, it introduces a new field in the record.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20220803/3bcff521/attachment.htm>

More information about the fpc-pascal mailing list