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

2018-08-17 Thread Bo Berglund
On Sat, 18 Aug 2018 03:19:55 +0200, Sven Barth via fpc-pascal wrote: >In Delphi objects are deprecated Huh? ObjectPascal deprecating objects? Sounds far-fetched. -- Bo Berglund Developer in Sweden ___ fpc-pascal maillist -

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

2018-08-17 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Fr., 17. Aug. 2018, 18:22: > > > > On Aug 16, 2018, at 8:55 AM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > It shouldn't be hard. Feel free to provide a patch together with some > tests and it will be taken under consideration. > > So the

[fpc-pascal] Auto vars (again)

2018-08-17 Thread Ryan Joseph
I had some free time recently so I decided as a learning experience to fork the compiler and implement the “auto var” idea that was mentioned a few weeks ago. What I found is that it’s a pretty lightweight (in terms of impact on the compiler) and unintrusive way to manage memory on a per-scope

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

2018-08-17 Thread Maciej Izak
2018-08-17 17:48 GMT+02:00 Ryan Joseph : > So the reason that objects/classes in FPC don’t have operators in the > class (like advanced records) is for Delphi compatibility? That would be > great if operators were unified across records/classes. > In Delphi (NEXTGEN for mobile platforms and

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

2018-08-17 Thread Ryan Joseph
> On Aug 16, 2018, at 8:55 AM, Sven Barth via fpc-pascal > wrote: > > It shouldn't be hard. Feel free to provide a patch together with some tests > and it will be taken under consideration. So the reason that objects/classes in FPC don’t have operators in the class (like advanced records)

Re: [fpc-pascal] Branch table

2018-08-17 Thread Giuliano Colla
Il 17/08/2018 15:46, Marco Borsari via fpc-pascal ha scritto: I found that someone made that for me at link http://www.mindfruit.co.uk/2012/01/switch-blocks-jump-tables.html and I have tried to rewrite the program in at syntax

Re: [fpc-pascal] Branch table

2018-08-17 Thread Marco Borsari via fpc-pascal
Il 16/08/2018 17:40, Giuliano Colla ha scritto: The first thing I notice is that you load BX, which is a 16 bit register (the lower 16 bits of EBX), with the value of "next", and then Jump to the content of EBX which is a 32 bit register, whose lower 16 bits have been loaded but whose upper 16