Re: [fpc-pascal] Custom operators for non-record types

2012-07-01 Thread JC Chu
Do you have some inside information on the extra limitations regarding ordinal, floating point, and set types? As I understand, the only limitation on operator “overloading” should be that the operator do not have a default interpretation for the operands–result type combination. The modulus oper

Re: [fpc-pascal] Custom operators for non-record types

2012-07-01 Thread Sven Barth
On 01.07.2012 17:39, JC Chu wrote: 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.

[fpc-pascal] Custom operators for non-record types

2012-07-01 Thread JC Chu
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 op