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

2022-08-03 Thread Martin Frb via fpc-pascal
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? google free pascal language reference https://www.freepascal.org/docs-html

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

2022-08-03 Thread wkitty42--- via fpc-pascal
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? -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list where it belo

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

2022-08-02 Thread Michael Van Canneyt via fpc-pascal
On Mon, 1 Aug 2022, Skybuck Flying via fpc-pascal wrote: } {$mode objfpc}{$H+} You need additionally a modeswitch for advanced records, or properties in records will not work: {$modeswitch advancedrecords} // UNION example case integer of   0 : ( m

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

2022-08-02 Thread Skybuck Flying via fpc-pascal
program TestProgram3; { Test program to illustrate the 'union' followed by property problem in Delphi language and Free Pascal Language version 0.01 created on 1 august 2022 by Skybuck Flying There is a problem with "unions" in Delphi language: When a property follows a "union" declaration it