Re: [fpc-pascal] why can't we define class operator for old fashion object type, but ok for 'advanced record' type?

2018-08-15 Thread Michael Van Canneyt
On Wed, 15 Aug 2018, Sven Barth via fpc-pascal wrote: But maybe you are using mode delphi ? If so, try separating out the object definition in a separate unit which is not compiled in delphi mode. A global operator won't help at all as (currently) the operator won't be visible during the

Re: [fpc-pascal] why can't we define class operator for old fashion object type, but ok for 'advanced record' type?

2018-08-15 Thread Sven Barth via fpc-pascal
Am 15.08.2018 um 10:59 schrieb Dennis: Why class operator is accepted for advanced records but not old fashion object??? Because objects are not records. Internally they are handled more closely to classes than records. Regards, Sven ___ fpc-pascal

Re: [fpc-pascal] why can't we define class operator for old fashion object type, but ok for 'advanced record' type?

2018-08-15 Thread Sven Barth via fpc-pascal
Am 15.08.2018 um 11:17 schrieb Michael Van Canneyt: On Wed, 15 Aug 2018, Dennis wrote: Michael Van Canneyt wrote: On Wed, 15 Aug 2018, Dennis wrote: I was trying to use a generic class TDictionary  with type T. This class has a method that compares a variable of T with another one.

Re: [fpc-pascal] why can't we define class operator for old fashion object type, but ok for 'advanced record' type?

2018-08-15 Thread Michael Van Canneyt
On Wed, 15 Aug 2018, Dennis wrote: Michael Van Canneyt wrote: On Wed, 15 Aug 2018, Dennis wrote: I was trying to use a generic class TDictionary  with type T. This class has a method that compares a variable of T with another one. When I specialize a class using this TDictionary with

Re: [fpc-pascal] why can't we define class operator for old fashion object type, but ok for 'advanced record' type?

2018-08-15 Thread Dennis
Michael Van Canneyt wrote: On Wed, 15 Aug 2018, Dennis wrote: I was trying to use a generic class TDictionary  with type T. This class has a method that compares a variable of T with another one. When I specialize a class using this TDictionary with a type: TSecurity = object  

Re: [fpc-pascal] why can't we define class operator for old fashion object type, but ok for 'advanced record' type?

2018-08-15 Thread Michael Van Canneyt
On Wed, 15 Aug 2018, Dennis wrote: I was trying to use a generic class TDictionary  with type T. This class has a method that compares a variable of T with another one. When I specialize a class using this TDictionary with a type: TSecurity = object   end; e.g. TNewDict =

[fpc-pascal] why can't we define class operator for old fashion object type, but ok for 'advanced record' type?

2018-08-15 Thread Dennis
I was trying to use a generic class TDictionary  with type T. This class has a method that compares a variable of T with another one. When I specialize a class using this TDictionary with a type: TSecurity = object   end; e.g. TNewDict = class(TDictionary); it raise a compiler

[fpc-pascal] Branch table

2018-08-15 Thread Marco Borsari via fpc-pascal
Why the code below does exit gracefully without prints anything? Sure, it is for my poor knowledge of the assembler, but in some details, please... program branch; {$ASMMODE intel} label next,stop,a,b,c; var idx:byte; begin write('Index? '); readln(idx); asm mov ax,idx; shl ax,2; mov bx,next;