[fpc-pascal] Custom operators for non-record types
jcchu at acm.org
Sun Jul 1 17:39:16 CEST 2012
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
Is this a bug, or is there any explanation for this?
More information about the fpc-pascal