[fpc-pascal] Union field after property violates "field before property" rule + property of union field not possible.

Jean SUZINEAU jean.suzineau at wanadoo.fr
Mon Aug 15 15:42:24 CEST 2022


An if you eventually need a read only UnionField :

  TmByte= packed array[0..7] of Byte;
  TDataExample2
  =
   record
     internal
     :
      record
        case integer
        of
          0: (mData: Int64);
          1: (mByte: TmByte);
      end;
    property mByte     : TmByte read internal.mByte;
    property UnionField: Int64  read internal.mData;
   end;



More information about the fpc-pascal mailing list