We share code between Delphi and Oxygene and use the following construct to simulate .Net enums in Delphi.
TRunMode = record
class operator LogicalOr(const L: TRunMode; const R: TRunMode) : TRunMode;
class operator LogicalAnd(const L: TRunMode; const R: TRunMode) : TRunMode;
TRunMode = public flags (none,ServerOnly,Normal,Offline,ReadDatabase);
This enables us to write:
var r := TRunMode.Normal;
if r and TRunMode.Normal = TRunMode.Normal then
Unfortunately Oxygene fails to recognize LogicalOr and LogicalAnd and raises and error: (E55) Invalid operator name: “LogicalAnd”.
How can I tell Oxygene to completely ignore the LogicalOr and LogicalAnd lines?
Could you add support for these operators into Oxygene?
Thanks, Kees Vermeulen