In Delphi mode, each custom operator has to be associated with a record type, and must take or return such a record. It seems that the OBJFPC mode doesn’t have this restriction; for example, the Math unit exports a custom ** on Int64, which is a simple type.
However, I’ve been unable to define operators other than ** for non-record types, even if they do not conflict with the default interpretation. Examples include OPERATOR MOD (x, m: Double): Double and OPERATOR AND (x, y: Tristate): Tristate, where Tristate is an enumeration type. Is this a bug, or is there any explanation for this? Thanks. -- Best regards, JC Chu _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal