Re: [fpc-pascal] Comparison operator for generics

2017-09-12 Thread Michael Van Canneyt
On Tue, 12 Sep 2017, Ryan Joseph wrote: On Sep 12, 2017, at 4:46 PM, Maciej Izak wrote: Please check example at : packages\rtl-generics\examples\tcomparer\tcomparerproject.lpr Thanks. What is the & here? TCompare.&String(Left.Name, Right.Name); I don’t think I’ve ever seen that befor

Re: [fpc-pascal] Comparison operator for generics

2017-09-12 Thread Ryan Joseph
> On Sep 12, 2017, at 4:46 PM, Maciej Izak wrote: > > Please check example at : > packages\rtl-generics\examples\tcomparer\tcomparerproject.lpr Thanks. What is the & here? TCompare.&String(Left.Name, Right.Name); I don’t think I’ve ever seen that before. Regards, Ryan Joseph _

Re: [fpc-pascal] Comparison operator for generics

2017-09-12 Thread Maciej Izak
2017-09-12 7:59 GMT+02:00 Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org>: > You could try to use the TEqualityComparer<> (or so) types from the > rtl-generics package (don't know in which unit exactly they are ^^') as > those can work with records without operator overloads. > Gener

Re: [fpc-pascal] Comparison operator for generics

2017-09-12 Thread Maciej Izak
2017-09-12 11:07 GMT+02:00 Ryan Joseph : > > Do any examples of how to use the class exist? I searched around and > couldn’t find a single snippet even though it appears to exist in Delphi. Please check example at : packages\rtl-generics\examples\tcomparer\tcomparerproject.lpr -- Best regards,

Re: [fpc-pascal] Comparison operator for generics

2017-09-12 Thread Ryan Joseph
> On Sep 12, 2017, at 12:59 PM, Sven Barth via fpc-pascal > wrote: > > You could try to use the TEqualityComparer<> (or so) types from the > rtl-generics package (don't know in which unit exactly they are ^^') as those > can work with records without operator overloads. > Do any examples of

Re: [fpc-pascal] Inclocked/declocked

2017-09-12 Thread Ryan Joseph
> On Sep 12, 2017, at 12:56 PM, Sven Barth via fpc-pascal > wrote: > > The Inc-/DecLocked routines perform a locked increment/decrement, so they're > blocking the memory bus for all cores (simply spoken), thus leading to a > higher CPU utilization. On e.g. i386 there is an optimisation to onl

Re: [fpc-pascal] Inclocked/declocked

2017-09-12 Thread Mark Morgan Lloyd
On 11/09/17 19:45, Sven Barth via fpc-pascal wrote: I've rechecked and the thing is as follows:- the IncLocked call happens each time you assign a dynamic array toanother dynamic array variable or a by-value parameter (this alsoincludes being part of a record, but not a class instance or TP-st

Re: [fpc-pascal] Using Serial in a TCP/RS232 gateway, how to set buffer sizes?

2017-09-12 Thread Michael Schnell
On 06.09.2017 20:35, Bo Berglund wrote: ... (i.e. appropriately small packets. counting packet number. ACK block containing the packet number it answers to, timeout, retransmit, ...) Not to forget: save detection of block start and block end (and hence introducing a decent transparentizin

Re: [fpc-pascal] Using Serial in a TCP/RS232 gateway, how to set buffer sizes?

2017-09-12 Thread Michael Schnell
On 06.09.2017 20:35, Bo Berglund wrote: The problem is that when the Windows app is done sending the data system is still missing many kilobytes So no ACK is returned, it is still in receive mode. On serial lines bits and bytes always can get lost or be distorted, independent from OS, hardw

Re: [fpc-pascal] Where and Why is there a memory leak?

2017-09-12 Thread Michael Schnell
On 06.09.2017 18:03, Graeme Geldenhuys wrote: Quite likely. It did all sound awfully familiar. :-) Is there even a thinkable solution ? To me the offering of two incompatible kinds of interfaces (not regarding the external libraries but the language construct) seems rather odd, especially as