Do it like this:
type obj = object
vars : record
case boolean of
....
end ;
end ;
----- Original Message -----
From: "Ryan Joseph via fpc-pascal" <fpc-pascal@lists.freepascal.org>
To: "FPC-Pascal users discussions" <fpc-pascal@lists.freepascal.org>
Cc: "Ryan Joseph" <generic...@gmail.com>
Sent: Sunday, November 24, 2019 3:18 PM
Subject: [fpc-pascal] Variant part in objects?
Is there a reason that objects don't support variant sections like with
records? Maybe they mess with the VMT table when virtual methods are
added?
I just posted my "advanced objects" patch
(https://bugs.freepascal.org/view.php?id=36350) and all it does is add
"class operators" to objects but I was curious about the variant records
because it appears to be the only other thing from records that aren't in
objects.
Regards,
Ryan Joseph
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal